#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricBeginCreateRuntime<P1, P3>(
riid: *const windows_core::GUID,
exithandler: P1,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<IFabricProcessExitHandler>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
windows_core::link!("" "C" fn FabricBeginCreateRuntime(riid : *const windows_core::GUID, exithandler : *mut core::ffi::c_void, timeoutmilliseconds : u32, callback : *mut core::ffi::c_void, context : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricBeginCreateRuntime(
riid,
exithandler.param().abi(),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricBeginGetActivationContext<P2>(
riid: *const windows_core::GUID,
timeoutmilliseconds: u32,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
windows_core::link!("" "C" fn FabricBeginGetActivationContext(riid : *const windows_core::GUID, timeoutmilliseconds : u32, callback : *mut core::ffi::c_void, context : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricBeginGetActivationContext(
riid,
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricBeginGetCodePackageActivator<P2>(
riid: *const windows_core::GUID,
timeoutmilliseconds: u32,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
windows_core::link!("" "C" fn FabricBeginGetCodePackageActivator(riid : *const windows_core::GUID, timeoutmilliseconds : u32, callback : *mut core::ffi::c_void, context : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricBeginGetCodePackageActivator(
riid,
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricBeginGetNodeContext<P1>(
timeoutmilliseconds: u32,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
windows_core::link!("" "C" fn FabricBeginGetNodeContext(timeoutmilliseconds : u32, callback : *mut core::ffi::c_void, context : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricBeginGetNodeContext(timeoutmilliseconds, callback.param().abi(), &mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateExtentLog<P2>(
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
directorypath: P2,
) -> windows_core::Result<*mut core::ffi::c_void>
where
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricCreateExtentLog(partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, directorypath : windows_core::PCWSTR, result : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricCreateExtentLog(
partitionid,
replicaid,
directorypath.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateKeyValueStoreReplica<P1, P7, T>(
storename: P1,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
localstorekind: super::FabricTypes::FABRIC_LOCAL_STORE_KIND,
localstoresettings: *const core::ffi::c_void,
storeeventhandler: P7,
) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P7: windows_core::Param<IFabricStoreEventHandler>,
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateKeyValueStoreReplica(riid : *const windows_core::GUID, storename : windows_core::PCWSTR, partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, replicatorsettings : *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS, localstorekind : super::FabricTypes::FABRIC_LOCAL_STORE_KIND, localstoresettings : *const core::ffi::c_void, storeeventhandler : *mut core::ffi::c_void, keyvaluestore : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateKeyValueStoreReplica(
&T::IID,
storename.param().abi(),
partitionid,
replicaid,
replicatorsettings,
localstorekind,
localstoresettings,
storeeventhandler.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateKeyValueStoreReplica2<P1, P7, P8, T>(
storename: P1,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
localstorekind: super::FabricTypes::FABRIC_LOCAL_STORE_KIND,
localstoresettings: *const core::ffi::c_void,
storeeventhandler: P7,
secondaryeventhandler: P8,
notificationmode: super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE,
) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P7: windows_core::Param<IFabricStoreEventHandler>,
P8: windows_core::Param<IFabricSecondaryEventHandler>,
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateKeyValueStoreReplica2(riid : *const windows_core::GUID, storename : windows_core::PCWSTR, partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, replicatorsettings : *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS, localstorekind : super::FabricTypes::FABRIC_LOCAL_STORE_KIND, localstoresettings : *const core::ffi::c_void, storeeventhandler : *mut core::ffi::c_void, secondaryeventhandler : *mut core::ffi::c_void, notificationmode : super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE, keyvaluestore : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateKeyValueStoreReplica2(
&T::IID,
storename.param().abi(),
partitionid,
replicaid,
replicatorsettings,
localstorekind,
localstoresettings,
storeeventhandler.param().abi(),
secondaryeventhandler.param().abi(),
notificationmode,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateKeyValueStoreReplica3<P1, P7, P8, T>(
storename: P1,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
localstorekind: super::FabricTypes::FABRIC_LOCAL_STORE_KIND,
localstoresettings: *const core::ffi::c_void,
storeeventhandler: P7,
secondaryeventhandler: P8,
notificationmode: super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE,
) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P7: windows_core::Param<IFabricStoreEventHandler>,
P8: windows_core::Param<IFabricSecondaryEventHandler>,
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateKeyValueStoreReplica3(riid : *const windows_core::GUID, storename : windows_core::PCWSTR, partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, replicatorsettings : *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS, localstorekind : super::FabricTypes::FABRIC_LOCAL_STORE_KIND, localstoresettings : *const core::ffi::c_void, storeeventhandler : *mut core::ffi::c_void, secondaryeventhandler : *mut core::ffi::c_void, notificationmode : super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE, keyvaluestore : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateKeyValueStoreReplica3(
&T::IID,
storename.param().abi(),
partitionid,
replicaid,
replicatorsettings,
localstorekind,
localstoresettings,
storeeventhandler.param().abi(),
secondaryeventhandler.param().abi(),
notificationmode,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateKeyValueStoreReplica4<P1, P8, P9, T>(
storename: P1,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
servicename: super::FabricTypes::FABRIC_URI,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
localstorekind: super::FabricTypes::FABRIC_LOCAL_STORE_KIND,
localstoresettings: *const core::ffi::c_void,
storeeventhandler: P8,
secondaryeventhandler: P9,
notificationmode: super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE,
) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P8: windows_core::Param<IFabricStoreEventHandler>,
P9: windows_core::Param<IFabricSecondaryEventHandler>,
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateKeyValueStoreReplica4(riid : *const windows_core::GUID, storename : windows_core::PCWSTR, partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, servicename : super::FabricTypes::FABRIC_URI, replicatorsettings : *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS, localstorekind : super::FabricTypes::FABRIC_LOCAL_STORE_KIND, localstoresettings : *const core::ffi::c_void, storeeventhandler : *mut core::ffi::c_void, secondaryeventhandler : *mut core::ffi::c_void, notificationmode : super::FabricTypes::FABRIC_KEY_VALUE_STORE_NOTIFICATION_MODE, keyvaluestore : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateKeyValueStoreReplica4(
&T::IID,
storename.param().abi(),
partitionid,
replicaid,
servicename,
replicatorsettings,
localstorekind,
localstoresettings,
storeeventhandler.param().abi(),
secondaryeventhandler.param().abi(),
notificationmode,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricCreateKeyValueStoreReplica5<P1, P9, P10, T>(
storename: P1,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
servicename: super::FabricTypes::FABRIC_URI,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
kvssettings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_REPLICA_SETTINGS,
localstorekind: super::FabricTypes::FABRIC_LOCAL_STORE_KIND,
localstoresettings: *const core::ffi::c_void,
storeeventhandler: P9,
secondaryeventhandler: P10,
) -> windows_core::Result<T>
where
P1: windows_core::Param<windows_core::PCWSTR>,
P9: windows_core::Param<IFabricStoreEventHandler>,
P10: windows_core::Param<IFabricSecondaryEventHandler>,
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateKeyValueStoreReplica5(riid : *const windows_core::GUID, storename : windows_core::PCWSTR, partitionid : super::FabricTypes::FABRIC_PARTITION_ID, replicaid : super::FabricTypes::FABRIC_REPLICA_ID, servicename : super::FabricTypes::FABRIC_URI, replicatorsettings : *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS, kvssettings : *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_REPLICA_SETTINGS, localstorekind : super::FabricTypes::FABRIC_LOCAL_STORE_KIND, localstoresettings : *const core::ffi::c_void, storeeventhandler : *mut core::ffi::c_void, secondaryeventhandler : *mut core::ffi::c_void, keyvaluestore : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateKeyValueStoreReplica5(
&T::IID,
storename.param().abi(),
partitionid,
replicaid,
servicename,
replicatorsettings,
kvssettings,
localstorekind,
localstoresettings,
storeeventhandler.param().abi(),
secondaryeventhandler.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricCreateRuntime<T>() -> windows_core::Result<T>
where
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricCreateRuntime(riid : *const windows_core::GUID, fabricruntime : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricCreateRuntime(&T::IID, &mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricEndCreateRuntime<P0>(
context: P0,
) -> windows_core::Result<*mut core::ffi::c_void>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
windows_core::link!("" "C" fn FabricEndCreateRuntime(context : *mut core::ffi::c_void, fabricruntime : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEndCreateRuntime(context.param().abi(), &mut result__).map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricEndGetActivationContext<P0>(
context: P0,
) -> windows_core::Result<*mut core::ffi::c_void>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
windows_core::link!("" "C" fn FabricEndGetActivationContext(context : *mut core::ffi::c_void, activationcontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEndGetActivationContext(context.param().abi(), &mut result__).map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricEndGetCodePackageActivator<P0>(
context: P0,
) -> windows_core::Result<*mut core::ffi::c_void>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
windows_core::link!("" "C" fn FabricEndGetCodePackageActivator(context : *mut core::ffi::c_void, activator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEndGetCodePackageActivator(context.param().abi(), &mut result__).map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
#[inline]
pub unsafe fn FabricEndGetNodeContext<P0>(
context: P0,
) -> windows_core::Result<*mut core::ffi::c_void>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
windows_core::link!("" "C" fn FabricEndGetNodeContext(context : *mut core::ffi::c_void, nodecontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEndGetNodeContext(context.param().abi(), &mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn FabricGetActivationContext<T>() -> windows_core::Result<T>
where
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricGetActivationContext(riid : *const windows_core::GUID, activationcontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricGetActivationContext(&T::IID, &mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricGetCodePackageActivator<T>() -> windows_core::Result<T>
where
T: windows_core::Interface,
{
windows_core::link!("" "C" fn FabricGetCodePackageActivator(riid : *const windows_core::GUID, activator : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
let mut result__ = core::ptr::null_mut();
unsafe {
FabricGetCodePackageActivator(&T::IID, &mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricGetNodeContext() -> windows_core::Result<*mut core::ffi::c_void> {
windows_core::link!("" "C" fn FabricGetNodeContext(nodecontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricGetNodeContext(&mut result__).map(|| result__)
}
}
#[inline]
pub unsafe fn FabricLoadEseLocalStoreSettings<P0, P1, P2>(
codepackageactivationcontext: P0,
configurationpackagename: P1,
sectionname: P2,
) -> windows_core::Result<IFabricEseLocalStoreSettingsResult>
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricLoadEseLocalStoreSettings(codepackageactivationcontext : *mut core::ffi::c_void, configurationpackagename : windows_core::PCWSTR, sectionname : windows_core::PCWSTR, settings : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricLoadEseLocalStoreSettings(
codepackageactivationcontext.param().abi(),
configurationpackagename.param().abi(),
sectionname.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricLoadReplicatorSettings<P0, P1, P2>(
codepackageactivationcontext: P0,
configurationpackagename: P1,
sectionname: P2,
) -> windows_core::Result<IFabricReplicatorSettingsResult>
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricLoadReplicatorSettings(codepackageactivationcontext : *mut core::ffi::c_void, configurationpackagename : windows_core::PCWSTR, sectionname : windows_core::PCWSTR, replicatorsettings : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricLoadReplicatorSettings(
codepackageactivationcontext.param().abi(),
configurationpackagename.param().abi(),
sectionname.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricLoadSecurityCredentials<P0, P1, P2>(
codepackageactivationcontext: P0,
configurationpackagename: P1,
sectionname: P2,
) -> windows_core::Result<IFabricSecurityCredentialsResult>
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricLoadSecurityCredentials(codepackageactivationcontext : *mut core::ffi::c_void, configurationpackagename : windows_core::PCWSTR, sectionname : windows_core::PCWSTR, securitycredentials : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricLoadSecurityCredentials(
codepackageactivationcontext.param().abi(),
configurationpackagename.param().abi(),
sectionname.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub const FabricRuntime: windows_core::GUID =
windows_core::GUID::from_u128(0xcc53af8c_74cd_11df_ac3e_0024811e3892);
pub type FnFabricMain = Option<
unsafe extern "system" fn(
runtime: windows_core::Ref<IFabricRuntime>,
activationcontext: windows_core::Ref<IFabricCodePackageActivationContext>,
) -> windows_core::HRESULT,
>;
windows_core::imp::define_interface!(
IExtentLogicalLog,
IExtentLogicalLog_Vtbl,
0x778dfdc1_58f5_4cec_a266_65e1bc8281f4
);
windows_core::imp::interface_hierarchy!(IExtentLogicalLog, windows_core::IUnknown);
impl IExtentLogicalLog {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOpen<P0, P1>(
&self,
directorypath: P0,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOpen)(
windows_core::Interface::as_raw(self),
directorypath.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOpen<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndOpen)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn Append(
&self,
buffersizeinbytes: u32,
buffer: *const u8,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).Append)(
windows_core::Interface::as_raw(self),
buffersizeinbytes,
buffer,
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginFlushWithMarker<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginFlushWithMarker)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndFlushWithMarker<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndFlushWithMarker)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginClose<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginClose)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndClose<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndClose)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IExtentLogicalLog_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOpen: usize,
pub Append:
unsafe extern "system" fn(*mut core::ffi::c_void, u32, *const u8) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginFlushWithMarker: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginFlushWithMarker: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndFlushWithMarker: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndFlushWithMarker: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginClose: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndClose: usize,
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IExtentLogicalLog_Impl: windows_core::IUnknownImpl {
fn BeginOpen(
&self,
directorypath: &windows_core::PCWSTR,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOpen(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn Append(&self, buffersizeinbytes: u32, buffer: *const u8) -> windows_core::Result<()>;
fn BeginFlushWithMarker(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndFlushWithMarker(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginClose(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndClose(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IExtentLogicalLog_Vtbl {
pub const fn new<Identity: IExtentLogicalLog_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginOpen<
Identity: IExtentLogicalLog_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
directorypath: windows_core::PCWSTR,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IExtentLogicalLog_Impl::BeginOpen(
this,
core::mem::transmute(&directorypath),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOpen<Identity: IExtentLogicalLog_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IExtentLogicalLog_Impl::EndOpen(this, core::mem::transmute_copy(&context)).into()
}
}
unsafe extern "system" fn Append<Identity: IExtentLogicalLog_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
buffersizeinbytes: u32,
buffer: *const u8,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IExtentLogicalLog_Impl::Append(
this,
core::mem::transmute_copy(&buffersizeinbytes),
core::mem::transmute_copy(&buffer),
)
.into()
}
}
unsafe extern "system" fn BeginFlushWithMarker<
Identity: IExtentLogicalLog_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IExtentLogicalLog_Impl::BeginFlushWithMarker(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndFlushWithMarker<
Identity: IExtentLogicalLog_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IExtentLogicalLog_Impl::EndFlushWithMarker(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn BeginClose<
Identity: IExtentLogicalLog_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IExtentLogicalLog_Impl::BeginClose(this, core::mem::transmute_copy(&callback))
{
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndClose<
Identity: IExtentLogicalLog_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IExtentLogicalLog_Impl::EndClose(this, core::mem::transmute_copy(&context)).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginOpen: BeginOpen::<Identity, OFFSET>,
EndOpen: EndOpen::<Identity, OFFSET>,
Append: Append::<Identity, OFFSET>,
BeginFlushWithMarker: BeginFlushWithMarker::<Identity, OFFSET>,
EndFlushWithMarker: EndFlushWithMarker::<Identity, OFFSET>,
BeginClose: BeginClose::<Identity, OFFSET>,
EndClose: EndClose::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IExtentLogicalLog as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IExtentLogicalLog {}
windows_core::imp::define_interface!(
IFabricAtomicGroupStateProvider,
IFabricAtomicGroupStateProvider_Vtbl,
0x2b670953_6148_4f7d_a920_b390de43d913
);
windows_core::imp::interface_hierarchy!(IFabricAtomicGroupStateProvider, windows_core::IUnknown);
impl IFabricAtomicGroupStateProvider {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginAtomicGroupCommit<P2>(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
commitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginAtomicGroupCommit)(
windows_core::Interface::as_raw(self),
atomicgroupid,
commitsequencenumber,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndAtomicGroupCommit<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndAtomicGroupCommit)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginAtomicGroupRollback<P2>(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
rollbackequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginAtomicGroupRollback)(
windows_core::Interface::as_raw(self),
atomicgroupid,
rollbackequencenumber,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndAtomicGroupRollback<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndAtomicGroupRollback)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginUndoProgress<P1>(
&self,
fromcommitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginUndoProgress)(
windows_core::Interface::as_raw(self),
fromcommitsequencenumber,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndUndoProgress<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndUndoProgress)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricAtomicGroupStateProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginAtomicGroupCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginAtomicGroupCommit: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndAtomicGroupCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndAtomicGroupCommit: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginAtomicGroupRollback: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginAtomicGroupRollback: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndAtomicGroupRollback: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndAtomicGroupRollback: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginUndoProgress: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginUndoProgress: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndUndoProgress: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndUndoProgress: usize,
}
unsafe impl Send for IFabricAtomicGroupStateProvider {}
unsafe impl Sync for IFabricAtomicGroupStateProvider {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricAtomicGroupStateProvider_Impl: windows_core::IUnknownImpl {
fn BeginAtomicGroupCommit(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
commitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndAtomicGroupCommit(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginAtomicGroupRollback(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
rollbackequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndAtomicGroupRollback(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginUndoProgress(
&self,
fromcommitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndUndoProgress(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricAtomicGroupStateProvider_Vtbl {
pub const fn new<Identity: IFabricAtomicGroupStateProvider_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn BeginAtomicGroupCommit<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
commitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateProvider_Impl::BeginAtomicGroupCommit(
this,
core::mem::transmute_copy(&atomicgroupid),
core::mem::transmute_copy(&commitsequencenumber),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndAtomicGroupCommit<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAtomicGroupStateProvider_Impl::EndAtomicGroupCommit(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn BeginAtomicGroupRollback<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
rollbackequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateProvider_Impl::BeginAtomicGroupRollback(
this,
core::mem::transmute_copy(&atomicgroupid),
core::mem::transmute_copy(&rollbackequencenumber),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndAtomicGroupRollback<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAtomicGroupStateProvider_Impl::EndAtomicGroupRollback(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn BeginUndoProgress<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
fromcommitsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateProvider_Impl::BeginUndoProgress(
this,
core::mem::transmute_copy(&fromcommitsequencenumber),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndUndoProgress<
Identity: IFabricAtomicGroupStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAtomicGroupStateProvider_Impl::EndUndoProgress(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginAtomicGroupCommit: BeginAtomicGroupCommit::<Identity, OFFSET>,
EndAtomicGroupCommit: EndAtomicGroupCommit::<Identity, OFFSET>,
BeginAtomicGroupRollback: BeginAtomicGroupRollback::<Identity, OFFSET>,
EndAtomicGroupRollback: EndAtomicGroupRollback::<Identity, OFFSET>,
BeginUndoProgress: BeginUndoProgress::<Identity, OFFSET>,
EndUndoProgress: EndUndoProgress::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricAtomicGroupStateProvider as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricAtomicGroupStateProvider {}
windows_core::imp::define_interface!(
IFabricAtomicGroupStateReplicator,
IFabricAtomicGroupStateReplicator_Vtbl,
0x80d2155c_4fc2_4fde_9696_c2f39b471c3d
);
windows_core::imp::interface_hierarchy!(IFabricAtomicGroupStateReplicator, windows_core::IUnknown);
impl IFabricAtomicGroupStateReplicator {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateAtomicGroup(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_ATOMIC_GROUP_ID> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateAtomicGroup)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginReplicateAtomicGroupOperation<P1, P2>(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
operationdata: P1,
callback: P2,
operationsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<IFabricOperationData>,
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginReplicateAtomicGroupOperation)(
windows_core::Interface::as_raw(self),
atomicgroupid,
operationdata.param().abi(),
callback.param().abi(),
operationsequencenumber as _,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn EndReplicateAtomicGroupOperation<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndReplicateAtomicGroupOperation)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginReplicateAtomicGroupCommit<P1>(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: P1,
commitsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginReplicateAtomicGroupCommit)(
windows_core::Interface::as_raw(self),
atomicgroupid,
callback.param().abi(),
commitsequencenumber as _,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn EndReplicateAtomicGroupCommit<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndReplicateAtomicGroupCommit)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginReplicateAtomicGroupRollback<P1>(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: P1,
rollbacksequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginReplicateAtomicGroupRollback)(
windows_core::Interface::as_raw(self),
atomicgroupid,
callback.param().abi(),
rollbacksequencenumber as _,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn EndReplicateAtomicGroupRollback<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndReplicateAtomicGroupRollback)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricAtomicGroupStateReplicator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateAtomicGroup: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateAtomicGroup: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginReplicateAtomicGroupOperation: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginReplicateAtomicGroupOperation: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub EndReplicateAtomicGroupOperation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
EndReplicateAtomicGroupOperation: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginReplicateAtomicGroupCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginReplicateAtomicGroupCommit: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub EndReplicateAtomicGroupCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
EndReplicateAtomicGroupCommit: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginReplicateAtomicGroupRollback: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginReplicateAtomicGroupRollback: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub EndReplicateAtomicGroupRollback: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
EndReplicateAtomicGroupRollback: usize,
}
unsafe impl Send for IFabricAtomicGroupStateReplicator {}
unsafe impl Sync for IFabricAtomicGroupStateReplicator {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricAtomicGroupStateReplicator_Impl: windows_core::IUnknownImpl {
fn CreateAtomicGroup(&self)
-> windows_core::Result<super::FabricTypes::FABRIC_ATOMIC_GROUP_ID>;
fn BeginReplicateAtomicGroupOperation(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
operationdata: windows_core::Ref<IFabricOperationData>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
operationsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndReplicateAtomicGroupOperation(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn BeginReplicateAtomicGroupCommit(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
commitsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndReplicateAtomicGroupCommit(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn BeginReplicateAtomicGroupRollback(
&self,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
rollbacksequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndReplicateAtomicGroupRollback(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricAtomicGroupStateReplicator_Vtbl {
pub const fn new<Identity: IFabricAtomicGroupStateReplicator_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn CreateAtomicGroup<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: *mut super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::CreateAtomicGroup(this) {
Ok(ok__) => {
atomicgroupid.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginReplicateAtomicGroupOperation<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
operationdata: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
operationsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::BeginReplicateAtomicGroupOperation(
this,
core::mem::transmute_copy(&atomicgroupid),
core::mem::transmute_copy(&operationdata),
core::mem::transmute_copy(&callback),
core::mem::transmute_copy(&operationsequencenumber),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndReplicateAtomicGroupOperation<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
operationsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::EndReplicateAtomicGroupOperation(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
operationsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginReplicateAtomicGroupCommit<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: *mut core::ffi::c_void,
commitsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::BeginReplicateAtomicGroupCommit(
this,
core::mem::transmute_copy(&atomicgroupid),
core::mem::transmute_copy(&callback),
core::mem::transmute_copy(&commitsequencenumber),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndReplicateAtomicGroupCommit<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
commitsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::EndReplicateAtomicGroupCommit(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
commitsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginReplicateAtomicGroupRollback<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
atomicgroupid: super::FabricTypes::FABRIC_ATOMIC_GROUP_ID,
callback: *mut core::ffi::c_void,
rollbacksequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::BeginReplicateAtomicGroupRollback(
this,
core::mem::transmute_copy(&atomicgroupid),
core::mem::transmute_copy(&callback),
core::mem::transmute_copy(&rollbacksequencenumber),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndReplicateAtomicGroupRollback<
Identity: IFabricAtomicGroupStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
rollbacksequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAtomicGroupStateReplicator_Impl::EndReplicateAtomicGroupRollback(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
rollbacksequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateAtomicGroup: CreateAtomicGroup::<Identity, OFFSET>,
BeginReplicateAtomicGroupOperation: BeginReplicateAtomicGroupOperation::<
Identity,
OFFSET,
>,
EndReplicateAtomicGroupOperation: EndReplicateAtomicGroupOperation::<Identity, OFFSET>,
BeginReplicateAtomicGroupCommit: BeginReplicateAtomicGroupCommit::<Identity, OFFSET>,
EndReplicateAtomicGroupCommit: EndReplicateAtomicGroupCommit::<Identity, OFFSET>,
BeginReplicateAtomicGroupRollback: BeginReplicateAtomicGroupRollback::<Identity, OFFSET>,
EndReplicateAtomicGroupRollback: EndReplicateAtomicGroupRollback::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricAtomicGroupStateReplicator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricAtomicGroupStateReplicator {}
windows_core::imp::define_interface!(
IFabricCodePackage,
IFabricCodePackage_Vtbl,
0x20792b45_4d13_41a4_af13_346e529f00c5
);
windows_core::imp::interface_hierarchy!(IFabricCodePackage, windows_core::IUnknown);
impl IFabricCodePackage {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Description(
&self,
) -> *const super::FabricTypes::FABRIC_CODE_PACKAGE_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_Description)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_Path(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_Path)(windows_core::Interface::as_raw(self))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackage_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_Description:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_CODE_PACKAGE_DESCRIPTION,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_Description: usize,
pub get_Path: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
}
unsafe impl Send for IFabricCodePackage {}
unsafe impl Sync for IFabricCodePackage {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricCodePackage_Impl: windows_core::IUnknownImpl {
fn get_Description(&self) -> *const super::FabricTypes::FABRIC_CODE_PACKAGE_DESCRIPTION;
fn get_Path(&self) -> windows_core::PCWSTR;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricCodePackage_Vtbl {
pub const fn new<Identity: IFabricCodePackage_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Description<
Identity: IFabricCodePackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_CODE_PACKAGE_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackage_Impl::get_Description(this)
}
}
unsafe extern "system" fn get_Path<
Identity: IFabricCodePackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackage_Impl::get_Path(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Description: get_Description::<Identity, OFFSET>,
get_Path: get_Path::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackage as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricCodePackage {}
windows_core::imp::define_interface!(
IFabricCodePackage2,
IFabricCodePackage2_Vtbl,
0xcdf0a4e6_ad80_4cd6_b67e_e4c002428600
);
impl core::ops::Deref for IFabricCodePackage2 {
type Target = IFabricCodePackage;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackage2,
windows_core::IUnknown,
IFabricCodePackage
);
impl IFabricCodePackage2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_SetupEntryPointRunAsPolicy(
&self,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_SetupEntryPointRunAsPolicy)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_EntryPointRunAsPolicy(
&self,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_EntryPointRunAsPolicy)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackage2_Vtbl {
pub base__: IFabricCodePackage_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_SetupEntryPointRunAsPolicy:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_SetupEntryPointRunAsPolicy: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_EntryPointRunAsPolicy:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_EntryPointRunAsPolicy: usize,
}
unsafe impl Send for IFabricCodePackage2 {}
unsafe impl Sync for IFabricCodePackage2 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricCodePackage2_Impl: IFabricCodePackage_Impl {
fn get_SetupEntryPointRunAsPolicy(
&self,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION;
fn get_EntryPointRunAsPolicy(
&self,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricCodePackage2_Vtbl {
pub const fn new<Identity: IFabricCodePackage2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_SetupEntryPointRunAsPolicy<
Identity: IFabricCodePackage2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackage2_Impl::get_SetupEntryPointRunAsPolicy(this)
}
}
unsafe extern "system" fn get_EntryPointRunAsPolicy<
Identity: IFabricCodePackage2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_RUNAS_POLICY_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackage2_Impl::get_EntryPointRunAsPolicy(this)
}
}
Self {
base__: IFabricCodePackage_Vtbl::new::<Identity, OFFSET>(),
get_SetupEntryPointRunAsPolicy: get_SetupEntryPointRunAsPolicy::<Identity, OFFSET>,
get_EntryPointRunAsPolicy: get_EntryPointRunAsPolicy::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackage2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackage as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricCodePackage2 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext,
IFabricCodePackageActivationContext_Vtbl,
0x68a971e2_f15f_4d95_a79c_8a257909659e
);
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext,
windows_core::IUnknown
);
impl IFabricCodePackageActivationContext {
pub unsafe fn get_ContextId(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_ContextId)(windows_core::Interface::as_raw(
self,
))
}
}
pub unsafe fn get_CodePackageName(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_CodePackageName)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_CodePackageVersion(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_CodePackageVersion)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_WorkDirectory(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_WorkDirectory)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_LogDirectory(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_LogDirectory)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_TempDirectory(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_TempDirectory)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ServiceTypes(
&self,
) -> *const super::FabricTypes::FABRIC_SERVICE_TYPE_DESCRIPTION_LIST {
unsafe {
(windows_core::Interface::vtable(self).get_ServiceTypes)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ServiceGroupTypes(
&self,
) -> *const super::FabricTypes::FABRIC_SERVICE_GROUP_TYPE_DESCRIPTION_LIST {
unsafe {
(windows_core::Interface::vtable(self).get_ServiceGroupTypes)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ApplicationPrincipals(
&self,
) -> *const super::FabricTypes::FABRIC_APPLICATION_PRINCIPALS_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_ApplicationPrincipals)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ServiceEndpointResources(
&self,
) -> *const super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION_LIST {
unsafe {
(windows_core::Interface::vtable(self).get_ServiceEndpointResources)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetServiceEndpointResource<P0>(
&self,
serviceendpointresourcename: P0,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetServiceEndpointResource)(
windows_core::Interface::as_raw(self),
serviceendpointresourcename.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetCodePackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCodePackageNames)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetConfigurationPackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetConfigurationPackageNames)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetDataPackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDataPackageNames)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn GetCodePackage<P0>(
&self,
codepackagename: P0,
) -> windows_core::Result<IFabricCodePackage>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCodePackage)(
windows_core::Interface::as_raw(self),
codepackagename.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn GetConfigurationPackage<P0>(
&self,
configpackagename: P0,
) -> windows_core::Result<IFabricConfigurationPackage>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetConfigurationPackage)(
windows_core::Interface::as_raw(self),
configpackagename.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn GetDataPackage<P0>(
&self,
datapackagename: P0,
) -> windows_core::Result<IFabricDataPackage>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDataPackage)(
windows_core::Interface::as_raw(self),
datapackagename.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn RegisterCodePackageChangeHandler<P0>(
&self,
callback: P0,
) -> windows_core::Result<i64>
where
P0: windows_core::Param<IFabricCodePackageChangeHandler>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RegisterCodePackageChangeHandler)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn UnregisterCodePackageChangeHandler(
&self,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UnregisterCodePackageChangeHandler)(
windows_core::Interface::as_raw(self),
callbackhandle,
)
}
}
pub unsafe fn RegisterConfigurationPackageChangeHandler<P0>(
&self,
callback: P0,
) -> windows_core::Result<i64>
where
P0: windows_core::Param<IFabricConfigurationPackageChangeHandler>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RegisterConfigurationPackageChangeHandler)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn UnregisterConfigurationPackageChangeHandler(
&self,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UnregisterConfigurationPackageChangeHandler)(
windows_core::Interface::as_raw(self),
callbackhandle,
)
}
}
pub unsafe fn RegisterDataPackageChangeHandler<P0>(
&self,
callback: P0,
) -> windows_core::Result<i64>
where
P0: windows_core::Param<IFabricDataPackageChangeHandler>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RegisterDataPackageChangeHandler)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn UnregisterDataPackageChangeHandler(
&self,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UnregisterDataPackageChangeHandler)(
windows_core::Interface::as_raw(self),
callbackhandle,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext_Vtbl { pub base__ : windows_core::IUnknown_Vtbl , pub get_ContextId : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , pub get_CodePackageName : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , pub get_CodePackageVersion : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , pub get_WorkDirectory : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , pub get_LogDirectory : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , pub get_TempDirectory : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ServiceTypes : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_SERVICE_TYPE_DESCRIPTION_LIST , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ServiceTypes : usize , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ServiceGroupTypes : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_SERVICE_GROUP_TYPE_DESCRIPTION_LIST , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ServiceGroupTypes : usize , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ApplicationPrincipals : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_APPLICATION_PRINCIPALS_DESCRIPTION , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ApplicationPrincipals : usize , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ServiceEndpointResources : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION_LIST , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ServiceEndpointResources : usize , # [cfg (feature = "ServiceFabric_FabricTypes")] pub GetServiceEndpointResource : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] GetServiceEndpointResource : usize , # [cfg (feature = "ServiceFabric_FabricCommon")] pub GetCodePackageNames : unsafe extern "system" fn (* mut core::ffi::c_void , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricCommon"))] GetCodePackageNames : usize , # [cfg (feature = "ServiceFabric_FabricCommon")] pub GetConfigurationPackageNames : unsafe extern "system" fn (* mut core::ffi::c_void , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricCommon"))] GetConfigurationPackageNames : usize , # [cfg (feature = "ServiceFabric_FabricCommon")] pub GetDataPackageNames : unsafe extern "system" fn (* mut core::ffi::c_void , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricCommon"))] GetDataPackageNames : usize , pub GetCodePackage : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , pub GetConfigurationPackage : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , pub GetDataPackage : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , pub RegisterCodePackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , * mut core::ffi::c_void , * mut i64) -> windows_core::HRESULT , pub UnregisterCodePackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , i64) -> windows_core::HRESULT , pub RegisterConfigurationPackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , * mut core::ffi::c_void , * mut i64) -> windows_core::HRESULT , pub UnregisterConfigurationPackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , i64) -> windows_core::HRESULT , pub RegisterDataPackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , * mut core::ffi::c_void , * mut i64) -> windows_core::HRESULT , pub UnregisterDataPackageChangeHandler : unsafe extern "system" fn (* mut core::ffi::c_void , i64) -> windows_core::HRESULT , }
unsafe impl Send for IFabricCodePackageActivationContext {}
unsafe impl Sync for IFabricCodePackageActivationContext {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext_Impl: windows_core::IUnknownImpl {
fn get_ContextId(&self) -> windows_core::PCWSTR;
fn get_CodePackageName(&self) -> windows_core::PCWSTR;
fn get_CodePackageVersion(&self) -> windows_core::PCWSTR;
fn get_WorkDirectory(&self) -> windows_core::PCWSTR;
fn get_LogDirectory(&self) -> windows_core::PCWSTR;
fn get_TempDirectory(&self) -> windows_core::PCWSTR;
fn get_ServiceTypes(&self) -> *const super::FabricTypes::FABRIC_SERVICE_TYPE_DESCRIPTION_LIST;
fn get_ServiceGroupTypes(
&self,
) -> *const super::FabricTypes::FABRIC_SERVICE_GROUP_TYPE_DESCRIPTION_LIST;
fn get_ApplicationPrincipals(
&self,
) -> *const super::FabricTypes::FABRIC_APPLICATION_PRINCIPALS_DESCRIPTION;
fn get_ServiceEndpointResources(
&self,
) -> *const super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION_LIST;
fn GetServiceEndpointResource(
&self,
serviceendpointresourcename: &windows_core::PCWSTR,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION>;
fn GetCodePackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult>;
fn GetConfigurationPackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult>;
fn GetDataPackageNames(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringListResult>;
fn GetCodePackage(
&self,
codepackagename: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricCodePackage>;
fn GetConfigurationPackage(
&self,
configpackagename: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricConfigurationPackage>;
fn GetDataPackage(
&self,
datapackagename: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricDataPackage>;
fn RegisterCodePackageChangeHandler(
&self,
callback: windows_core::Ref<IFabricCodePackageChangeHandler>,
) -> windows_core::Result<i64>;
fn UnregisterCodePackageChangeHandler(&self, callbackhandle: i64) -> windows_core::Result<()>;
fn RegisterConfigurationPackageChangeHandler(
&self,
callback: windows_core::Ref<IFabricConfigurationPackageChangeHandler>,
) -> windows_core::Result<i64>;
fn UnregisterConfigurationPackageChangeHandler(
&self,
callbackhandle: i64,
) -> windows_core::Result<()>;
fn RegisterDataPackageChangeHandler(
&self,
callback: windows_core::Ref<IFabricDataPackageChangeHandler>,
) -> windows_core::Result<i64>;
fn UnregisterDataPackageChangeHandler(&self, callbackhandle: i64) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn get_ContextId<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_ContextId(this)
}
}
unsafe extern "system" fn get_CodePackageName<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_CodePackageName(this)
}
}
unsafe extern "system" fn get_CodePackageVersion<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_CodePackageVersion(this)
}
}
unsafe extern "system" fn get_WorkDirectory<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_WorkDirectory(this)
}
}
unsafe extern "system" fn get_LogDirectory<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_LogDirectory(this)
}
}
unsafe extern "system" fn get_TempDirectory<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_TempDirectory(this)
}
}
unsafe extern "system" fn get_ServiceTypes<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_SERVICE_TYPE_DESCRIPTION_LIST {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_ServiceTypes(this)
}
}
unsafe extern "system" fn get_ServiceGroupTypes<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_SERVICE_GROUP_TYPE_DESCRIPTION_LIST {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_ServiceGroupTypes(this)
}
}
unsafe extern "system" fn get_ApplicationPrincipals<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_APPLICATION_PRINCIPALS_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_ApplicationPrincipals(this)
}
}
unsafe extern "system" fn get_ServiceEndpointResources<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION_LIST {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::get_ServiceEndpointResources(this)
}
}
unsafe extern "system" fn GetServiceEndpointResource<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
serviceendpointresourcename: windows_core::PCWSTR,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_ENDPOINT_RESOURCE_DESCRIPTION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetServiceEndpointResource(
this,
core::mem::transmute(&serviceendpointresourcename),
) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCodePackageNames<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
names: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetCodePackageNames(this) {
Ok(ok__) => {
names.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetConfigurationPackageNames<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
names: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetConfigurationPackageNames(this) {
Ok(ok__) => {
names.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDataPackageNames<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
names: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetDataPackageNames(this) {
Ok(ok__) => {
names.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCodePackage<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
codepackagename: windows_core::PCWSTR,
codepackage: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetCodePackage(
this,
core::mem::transmute(&codepackagename),
) {
Ok(ok__) => {
codepackage.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetConfigurationPackage<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
configpackagename: windows_core::PCWSTR,
configpackage: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetConfigurationPackage(
this,
core::mem::transmute(&configpackagename),
) {
Ok(ok__) => {
configpackage.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetDataPackage<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
datapackagename: windows_core::PCWSTR,
datapackage: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::GetDataPackage(
this,
core::mem::transmute(&datapackagename),
) {
Ok(ok__) => {
datapackage.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RegisterCodePackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
callbackhandle: *mut i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::RegisterCodePackageChangeHandler(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
callbackhandle.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UnregisterCodePackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::UnregisterCodePackageChangeHandler(
this,
core::mem::transmute_copy(&callbackhandle),
)
.into()
}
}
unsafe extern "system" fn RegisterConfigurationPackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
callbackhandle: *mut i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::RegisterConfigurationPackageChangeHandler (this , core::mem::transmute_copy (& callback) ,) { Ok (ok__) => { callbackhandle . write (ok__) ; windows_core::HRESULT (0) } Err (err) => err . into () }
}
}
unsafe extern "system" fn UnregisterConfigurationPackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::UnregisterConfigurationPackageChangeHandler (this , core::mem::transmute_copy (& callbackhandle) ,) . into ()
}
}
unsafe extern "system" fn RegisterDataPackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
callbackhandle: *mut i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext_Impl::RegisterDataPackageChangeHandler(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
callbackhandle.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UnregisterDataPackageChangeHandler<
Identity: IFabricCodePackageActivationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callbackhandle: i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext_Impl::UnregisterDataPackageChangeHandler(
this,
core::mem::transmute_copy(&callbackhandle),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_ContextId: get_ContextId::<Identity, OFFSET>,
get_CodePackageName: get_CodePackageName::<Identity, OFFSET>,
get_CodePackageVersion: get_CodePackageVersion::<Identity, OFFSET>,
get_WorkDirectory: get_WorkDirectory::<Identity, OFFSET>,
get_LogDirectory: get_LogDirectory::<Identity, OFFSET>,
get_TempDirectory: get_TempDirectory::<Identity, OFFSET>,
get_ServiceTypes: get_ServiceTypes::<Identity, OFFSET>,
get_ServiceGroupTypes: get_ServiceGroupTypes::<Identity, OFFSET>,
get_ApplicationPrincipals: get_ApplicationPrincipals::<Identity, OFFSET>,
get_ServiceEndpointResources: get_ServiceEndpointResources::<Identity, OFFSET>,
GetServiceEndpointResource: GetServiceEndpointResource::<Identity, OFFSET>,
GetCodePackageNames: GetCodePackageNames::<Identity, OFFSET>,
GetConfigurationPackageNames: GetConfigurationPackageNames::<Identity, OFFSET>,
GetDataPackageNames: GetDataPackageNames::<Identity, OFFSET>,
GetCodePackage: GetCodePackage::<Identity, OFFSET>,
GetConfigurationPackage: GetConfigurationPackage::<Identity, OFFSET>,
GetDataPackage: GetDataPackage::<Identity, OFFSET>,
RegisterCodePackageChangeHandler: RegisterCodePackageChangeHandler::<Identity, OFFSET>,
UnregisterCodePackageChangeHandler: UnregisterCodePackageChangeHandler::<
Identity,
OFFSET,
>,
RegisterConfigurationPackageChangeHandler: RegisterConfigurationPackageChangeHandler::<
Identity,
OFFSET,
>,
UnregisterConfigurationPackageChangeHandler:
UnregisterConfigurationPackageChangeHandler::<Identity, OFFSET>,
RegisterDataPackageChangeHandler: RegisterDataPackageChangeHandler::<Identity, OFFSET>,
UnregisterDataPackageChangeHandler: UnregisterDataPackageChangeHandler::<
Identity,
OFFSET,
>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext2,
IFabricCodePackageActivationContext2_Vtbl,
0x6c83d5c1_1954_4b80_9175_0d0e7c8715c9
);
impl core::ops::Deref for IFabricCodePackageActivationContext2 {
type Target = IFabricCodePackageActivationContext;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext2,
windows_core::IUnknown,
IFabricCodePackageActivationContext
);
impl IFabricCodePackageActivationContext2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ApplicationName(&self) -> super::FabricTypes::FABRIC_URI {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).get_ApplicationName)(
windows_core::Interface::as_raw(self),
&mut result__,
);
result__
}
}
pub unsafe fn get_ApplicationTypeName(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_ApplicationTypeName)(
windows_core::Interface::as_raw(self),
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetServiceManifestName(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetServiceManifestName)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetServiceManifestVersion(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetServiceManifestVersion)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext2_Vtbl {
pub base__: IFabricCodePackageActivationContext_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_ApplicationName:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut super::FabricTypes::FABRIC_URI),
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_ApplicationName: usize,
pub get_ApplicationTypeName:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub GetServiceManifestName: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
GetServiceManifestName: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub GetServiceManifestVersion: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
GetServiceManifestVersion: usize,
}
unsafe impl Send for IFabricCodePackageActivationContext2 {}
unsafe impl Sync for IFabricCodePackageActivationContext2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext2_Impl:
IFabricCodePackageActivationContext_Impl
{
fn get_ApplicationName(&self) -> super::FabricTypes::FABRIC_URI;
fn get_ApplicationTypeName(&self) -> windows_core::PCWSTR;
fn GetServiceManifestName(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
fn GetServiceManifestVersion(
&self,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext2_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext2_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn get_ApplicationName<
Identity: IFabricCodePackageActivationContext2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut super::FabricTypes::FABRIC_URI,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
*result__ = IFabricCodePackageActivationContext2_Impl::get_ApplicationName(this);
}
}
unsafe extern "system" fn get_ApplicationTypeName<
Identity: IFabricCodePackageActivationContext2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext2_Impl::get_ApplicationTypeName(this)
}
}
unsafe extern "system" fn GetServiceManifestName<
Identity: IFabricCodePackageActivationContext2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicemanifestname: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext2_Impl::GetServiceManifestName(this) {
Ok(ok__) => {
servicemanifestname.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetServiceManifestVersion<
Identity: IFabricCodePackageActivationContext2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicemanifestversion: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext2_Impl::GetServiceManifestVersion(this) {
Ok(ok__) => {
servicemanifestversion.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricCodePackageActivationContext_Vtbl::new::<Identity, OFFSET>(),
get_ApplicationName: get_ApplicationName::<Identity, OFFSET>,
get_ApplicationTypeName: get_ApplicationTypeName::<Identity, OFFSET>,
GetServiceManifestName: GetServiceManifestName::<Identity, OFFSET>,
GetServiceManifestVersion: GetServiceManifestVersion::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext2 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext3,
IFabricCodePackageActivationContext3_Vtbl,
0x6efee900_f491_4b03_bc5b_3a70de103593
);
impl core::ops::Deref for IFabricCodePackageActivationContext3 {
type Target = IFabricCodePackageActivationContext2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext3,
windows_core::IUnknown,
IFabricCodePackageActivationContext,
IFabricCodePackageActivationContext2
);
impl IFabricCodePackageActivationContext3 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportApplicationHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportApplicationHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportDeployedApplicationHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportDeployedApplicationHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportDeployedServicePackageHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportDeployedServicePackageHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext3_Vtbl {
pub base__: IFabricCodePackageActivationContext2_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportApplicationHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportApplicationHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportDeployedApplicationHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportDeployedApplicationHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportDeployedServicePackageHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportDeployedServicePackageHealth: usize,
}
unsafe impl Send for IFabricCodePackageActivationContext3 {}
unsafe impl Sync for IFabricCodePackageActivationContext3 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext3_Impl:
IFabricCodePackageActivationContext2_Impl
{
fn ReportApplicationHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
fn ReportDeployedApplicationHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
fn ReportDeployedServicePackageHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext3_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext3_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn ReportApplicationHealth<
Identity: IFabricCodePackageActivationContext3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext3_Impl::ReportApplicationHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
unsafe extern "system" fn ReportDeployedApplicationHealth<
Identity: IFabricCodePackageActivationContext3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext3_Impl::ReportDeployedApplicationHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
unsafe extern "system" fn ReportDeployedServicePackageHealth<
Identity: IFabricCodePackageActivationContext3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext3_Impl::ReportDeployedServicePackageHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
Self {
base__: IFabricCodePackageActivationContext2_Vtbl::new::<Identity, OFFSET>(),
ReportApplicationHealth: ReportApplicationHealth::<Identity, OFFSET>,
ReportDeployedApplicationHealth: ReportDeployedApplicationHealth::<Identity, OFFSET>,
ReportDeployedServicePackageHealth: ReportDeployedServicePackageHealth::<
Identity,
OFFSET,
>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext3 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext2 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext3 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext4,
IFabricCodePackageActivationContext4_Vtbl,
0x99efebb6_a7b4_4d45_b45e_f191a66eef03
);
impl core::ops::Deref for IFabricCodePackageActivationContext4 {
type Target = IFabricCodePackageActivationContext3;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext4,
windows_core::IUnknown,
IFabricCodePackageActivationContext,
IFabricCodePackageActivationContext2,
IFabricCodePackageActivationContext3
);
impl IFabricCodePackageActivationContext4 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportApplicationHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportApplicationHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportDeployedApplicationHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportDeployedApplicationHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportDeployedServicePackageHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportDeployedServicePackageHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext4_Vtbl {
pub base__: IFabricCodePackageActivationContext3_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportApplicationHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportApplicationHealth2: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportDeployedApplicationHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportDeployedApplicationHealth2: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportDeployedServicePackageHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
)
-> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportDeployedServicePackageHealth2: usize,
}
unsafe impl Send for IFabricCodePackageActivationContext4 {}
unsafe impl Sync for IFabricCodePackageActivationContext4 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext4_Impl:
IFabricCodePackageActivationContext3_Impl
{
fn ReportApplicationHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportDeployedApplicationHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportDeployedServicePackageHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext4_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext4_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn ReportApplicationHealth2<
Identity: IFabricCodePackageActivationContext4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext4_Impl::ReportApplicationHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportDeployedApplicationHealth2<
Identity: IFabricCodePackageActivationContext4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext4_Impl::ReportDeployedApplicationHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportDeployedServicePackageHealth2<
Identity: IFabricCodePackageActivationContext4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext4_Impl::ReportDeployedServicePackageHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
Self {
base__: IFabricCodePackageActivationContext3_Vtbl::new::<Identity, OFFSET>(),
ReportApplicationHealth2: ReportApplicationHealth2::<Identity, OFFSET>,
ReportDeployedApplicationHealth2: ReportDeployedApplicationHealth2::<Identity, OFFSET>,
ReportDeployedServicePackageHealth2: ReportDeployedServicePackageHealth2::<
Identity,
OFFSET,
>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext4 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext3 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext4 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext5,
IFabricCodePackageActivationContext5_Vtbl,
0xfe45387e_8711_4949_ac36_31dc95035513
);
impl core::ops::Deref for IFabricCodePackageActivationContext5 {
type Target = IFabricCodePackageActivationContext4;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext5,
windows_core::IUnknown,
IFabricCodePackageActivationContext,
IFabricCodePackageActivationContext2,
IFabricCodePackageActivationContext3,
IFabricCodePackageActivationContext4
);
impl IFabricCodePackageActivationContext5 {
pub unsafe fn get_ServiceListenAddress(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_ServiceListenAddress)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_ServicePublishAddress(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_ServicePublishAddress)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext5_Vtbl {
pub base__: IFabricCodePackageActivationContext4_Vtbl,
pub get_ServiceListenAddress:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
pub get_ServicePublishAddress:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
}
unsafe impl Send for IFabricCodePackageActivationContext5 {}
unsafe impl Sync for IFabricCodePackageActivationContext5 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext5_Impl:
IFabricCodePackageActivationContext4_Impl
{
fn get_ServiceListenAddress(&self) -> windows_core::PCWSTR;
fn get_ServicePublishAddress(&self) -> windows_core::PCWSTR;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext5_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext5_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn get_ServiceListenAddress<
Identity: IFabricCodePackageActivationContext5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext5_Impl::get_ServiceListenAddress(this)
}
}
unsafe extern "system" fn get_ServicePublishAddress<
Identity: IFabricCodePackageActivationContext5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivationContext5_Impl::get_ServicePublishAddress(this)
}
}
Self {
base__: IFabricCodePackageActivationContext4_Vtbl::new::<Identity, OFFSET>(),
get_ServiceListenAddress: get_ServiceListenAddress::<Identity, OFFSET>,
get_ServicePublishAddress: get_ServicePublishAddress::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext5 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext3 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext4 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext5 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivationContext6,
IFabricCodePackageActivationContext6_Vtbl,
0xfa5fda9b_472c_45a0_9b60_a374691227a4
);
impl core::ops::Deref for IFabricCodePackageActivationContext6 {
type Target = IFabricCodePackageActivationContext5;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivationContext6,
windows_core::IUnknown,
IFabricCodePackageActivationContext,
IFabricCodePackageActivationContext2,
IFabricCodePackageActivationContext3,
IFabricCodePackageActivationContext4,
IFabricCodePackageActivationContext5
);
impl IFabricCodePackageActivationContext6 {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetDirectory<P0>(
&self,
logicaldirectoryname: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDirectory)(
windows_core::Interface::as_raw(self),
logicaldirectoryname.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivationContext6_Vtbl {
pub base__: IFabricCodePackageActivationContext5_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub GetDirectory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
GetDirectory: usize,
}
unsafe impl Send for IFabricCodePackageActivationContext6 {}
unsafe impl Sync for IFabricCodePackageActivationContext6 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivationContext6_Impl:
IFabricCodePackageActivationContext5_Impl
{
fn GetDirectory(
&self,
logicaldirectoryname: &windows_core::PCWSTR,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivationContext6_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivationContext6_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn GetDirectory<
Identity: IFabricCodePackageActivationContext6_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
logicaldirectoryname: windows_core::PCWSTR,
directorypath: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivationContext6_Impl::GetDirectory(
this,
core::mem::transmute(&logicaldirectoryname),
) {
Ok(ok__) => {
directorypath.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricCodePackageActivationContext5_Vtbl::new::<Identity, OFFSET>(),
GetDirectory: GetDirectory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivationContext6 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext3 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext4 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivationContext5 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivationContext6 {}
windows_core::imp::define_interface!(
IFabricCodePackageActivator,
IFabricCodePackageActivator_Vtbl,
0x70be1b10_b259_46fc_b813_0b75720e7183
);
windows_core::imp::interface_hierarchy!(IFabricCodePackageActivator, windows_core::IUnknown);
impl IFabricCodePackageActivator {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginActivateCodePackage<P3>(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginActivateCodePackage)(
windows_core::Interface::as_raw(self),
codepackagenames,
environment,
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndActivateCodePackage<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndActivateCodePackage)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginDeactivateCodePackage<P2>(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
timeoutmilliseconds: u32,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginDeactivateCodePackage)(
windows_core::Interface::as_raw(self),
codepackagenames,
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndDeactivateCodePackage<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndDeactivateCodePackage)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn AbortCodePackage(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).AbortCodePackage)(
windows_core::Interface::as_raw(self),
codepackagenames,
)
}
}
pub unsafe fn RegisterCodePackageEventHandler<P0>(
&self,
eventhandler: P0,
) -> windows_core::Result<u64>
where
P0: windows_core::Param<IFabricCodePackageEventHandler>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).RegisterCodePackageEventHandler)(
windows_core::Interface::as_raw(self),
eventhandler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn UnregisterCodePackageEventHandler(
&self,
callbackhandle: u64,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UnregisterCodePackageEventHandler)(
windows_core::Interface::as_raw(self),
callbackhandle,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginActivateCodePackage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_STRING_LIST,
*const super::FabricTypes::FABRIC_STRING_MAP,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginActivateCodePackage: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndActivateCodePackage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndActivateCodePackage: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginDeactivateCodePackage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_STRING_LIST,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginDeactivateCodePackage: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndDeactivateCodePackage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndDeactivateCodePackage: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub AbortCodePackage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_STRING_LIST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
AbortCodePackage: usize,
pub RegisterCodePackageEventHandler: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut u64,
) -> windows_core::HRESULT,
pub UnregisterCodePackageEventHandler:
unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricCodePackageActivator {}
unsafe impl Sync for IFabricCodePackageActivator {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivator_Impl: windows_core::IUnknownImpl {
fn BeginActivateCodePackage(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndActivateCodePackage(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginDeactivateCodePackage(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndDeactivateCodePackage(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn AbortCodePackage(
&self,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
) -> windows_core::Result<()>;
fn RegisterCodePackageEventHandler(
&self,
eventhandler: windows_core::Ref<IFabricCodePackageEventHandler>,
) -> windows_core::Result<u64>;
fn UnregisterCodePackageEventHandler(&self, callbackhandle: u64) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivator_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginActivateCodePackage<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivator_Impl::BeginActivateCodePackage(
this,
core::mem::transmute_copy(&codepackagenames),
core::mem::transmute_copy(&environment),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndActivateCodePackage<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivator_Impl::EndActivateCodePackage(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn BeginDeactivateCodePackage<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivator_Impl::BeginDeactivateCodePackage(
this,
core::mem::transmute_copy(&codepackagenames),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndDeactivateCodePackage<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivator_Impl::EndDeactivateCodePackage(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn AbortCodePackage<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
codepackagenames: *const super::FabricTypes::FABRIC_STRING_LIST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivator_Impl::AbortCodePackage(
this,
core::mem::transmute_copy(&codepackagenames),
)
.into()
}
}
unsafe extern "system" fn RegisterCodePackageEventHandler<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
eventhandler: *mut core::ffi::c_void,
callbackhandle: *mut u64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivator_Impl::RegisterCodePackageEventHandler(
this,
core::mem::transmute_copy(&eventhandler),
) {
Ok(ok__) => {
callbackhandle.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UnregisterCodePackageEventHandler<
Identity: IFabricCodePackageActivator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callbackhandle: u64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageActivator_Impl::UnregisterCodePackageEventHandler(
this,
core::mem::transmute_copy(&callbackhandle),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginActivateCodePackage: BeginActivateCodePackage::<Identity, OFFSET>,
EndActivateCodePackage: EndActivateCodePackage::<Identity, OFFSET>,
BeginDeactivateCodePackage: BeginDeactivateCodePackage::<Identity, OFFSET>,
EndDeactivateCodePackage: EndDeactivateCodePackage::<Identity, OFFSET>,
AbortCodePackage: AbortCodePackage::<Identity, OFFSET>,
RegisterCodePackageEventHandler: RegisterCodePackageEventHandler::<Identity, OFFSET>,
UnregisterCodePackageEventHandler: UnregisterCodePackageEventHandler::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivator {}
windows_core::imp::define_interface!(
IFabricCodePackageActivator2,
IFabricCodePackageActivator2_Vtbl,
0x13c742aa_a426_4a5b_b2d2_7a9ac0db71e2
);
impl core::ops::Deref for IFabricCodePackageActivator2 {
type Target = IFabricCodePackageActivator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricCodePackageActivator2,
windows_core::IUnknown,
IFabricCodePackageActivator
);
impl IFabricCodePackageActivator2 {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginActivateCodePackage2<P3>(
&self,
cpactivationinfolist : * const super::FabricTypes::FABRIC_CODE_PACKAGE_ACTIVATION_INFORMATION_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginActivateCodePackage2)(
windows_core::Interface::as_raw(self),
cpactivationinfolist,
environment,
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageActivator2_Vtbl {
pub base__: IFabricCodePackageActivator_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginActivateCodePackage2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_CODE_PACKAGE_ACTIVATION_INFORMATION_LIST,
*const super::FabricTypes::FABRIC_STRING_MAP,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginActivateCodePackage2: usize,
}
unsafe impl Send for IFabricCodePackageActivator2 {}
unsafe impl Sync for IFabricCodePackageActivator2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricCodePackageActivator2_Impl: IFabricCodePackageActivator_Impl {
fn BeginActivateCodePackage2(
&self,
cpactivationinfolist : * const super::FabricTypes::FABRIC_CODE_PACKAGE_ACTIVATION_INFORMATION_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricCodePackageActivator2_Vtbl {
pub const fn new<Identity: IFabricCodePackageActivator2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginActivateCodePackage2<
Identity: IFabricCodePackageActivator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
cpactivationinfolist : * const super::FabricTypes::FABRIC_CODE_PACKAGE_ACTIVATION_INFORMATION_LIST,
environment: *const super::FabricTypes::FABRIC_STRING_MAP,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricCodePackageActivator2_Impl::BeginActivateCodePackage2(
this,
core::mem::transmute_copy(&cpactivationinfolist),
core::mem::transmute_copy(&environment),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricCodePackageActivator_Vtbl::new::<Identity, OFFSET>(),
BeginActivateCodePackage2: BeginActivateCodePackage2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageActivator2 as windows_core::Interface>::IID
|| iid == &<IFabricCodePackageActivator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricCodePackageActivator2 {}
windows_core::imp::define_interface!(
IFabricCodePackageChangeHandler,
IFabricCodePackageChangeHandler_Vtbl,
0xb90d36cd_acb5_427a_b318_3b045981d0cc
);
windows_core::imp::interface_hierarchy!(IFabricCodePackageChangeHandler, windows_core::IUnknown);
impl IFabricCodePackageChangeHandler {
pub unsafe fn OnPackageAdded<P0, P1>(&self, source: P0, codepackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricCodePackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageAdded)(
windows_core::Interface::as_raw(self),
source.param().abi(),
codepackage.param().abi(),
);
}
}
pub unsafe fn OnPackageRemoved<P0, P1>(&self, source: P0, codepackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricCodePackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageRemoved)(
windows_core::Interface::as_raw(self),
source.param().abi(),
codepackage.param().abi(),
);
}
}
pub unsafe fn OnPackageModified<P0, P1, P2>(
&self,
source: P0,
previouscodepackage: P1,
codepackage: P2,
) where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricCodePackage>,
P2: windows_core::Param<IFabricCodePackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageModified)(
windows_core::Interface::as_raw(self),
source.param().abi(),
previouscodepackage.param().abi(),
codepackage.param().abi(),
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageChangeHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnPackageAdded: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageRemoved: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageModified: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
}
unsafe impl Send for IFabricCodePackageChangeHandler {}
unsafe impl Sync for IFabricCodePackageChangeHandler {}
pub trait IFabricCodePackageChangeHandler_Impl: windows_core::IUnknownImpl {
fn OnPackageAdded(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
codepackage: windows_core::Ref<IFabricCodePackage>,
);
fn OnPackageRemoved(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
codepackage: windows_core::Ref<IFabricCodePackage>,
);
fn OnPackageModified(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
previouscodepackage: windows_core::Ref<IFabricCodePackage>,
codepackage: windows_core::Ref<IFabricCodePackage>,
);
}
impl IFabricCodePackageChangeHandler_Vtbl {
pub const fn new<Identity: IFabricCodePackageChangeHandler_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn OnPackageAdded<
Identity: IFabricCodePackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
codepackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageChangeHandler_Impl::OnPackageAdded(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&codepackage),
);
}
}
unsafe extern "system" fn OnPackageRemoved<
Identity: IFabricCodePackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
codepackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageChangeHandler_Impl::OnPackageRemoved(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&codepackage),
);
}
}
unsafe extern "system" fn OnPackageModified<
Identity: IFabricCodePackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
previouscodepackage: *mut core::ffi::c_void,
codepackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageChangeHandler_Impl::OnPackageModified(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&previouscodepackage),
core::mem::transmute_copy(&codepackage),
);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnPackageAdded: OnPackageAdded::<Identity, OFFSET>,
OnPackageRemoved: OnPackageRemoved::<Identity, OFFSET>,
OnPackageModified: OnPackageModified::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageChangeHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricCodePackageChangeHandler {}
windows_core::imp::define_interface!(
IFabricCodePackageEventHandler,
IFabricCodePackageEventHandler_Vtbl,
0x899e0ca8_16df_458e_8915_d0307b4ab101
);
windows_core::imp::interface_hierarchy!(IFabricCodePackageEventHandler, windows_core::IUnknown);
impl IFabricCodePackageEventHandler {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn OnCodePackageEvent<P0>(
&self,
source: P0,
eventdesc: *const super::FabricTypes::FABRIC_CODE_PACKAGE_EVENT_DESCRIPTION,
) where
P0: windows_core::Param<IFabricCodePackageActivator>,
{
unsafe {
(windows_core::Interface::vtable(self).OnCodePackageEvent)(
windows_core::Interface::as_raw(self),
source.param().abi(),
eventdesc,
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricCodePackageEventHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub OnCodePackageEvent: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_CODE_PACKAGE_EVENT_DESCRIPTION,
),
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
OnCodePackageEvent: usize,
}
unsafe impl Send for IFabricCodePackageEventHandler {}
unsafe impl Sync for IFabricCodePackageEventHandler {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricCodePackageEventHandler_Impl: windows_core::IUnknownImpl {
fn OnCodePackageEvent(
&self,
source: windows_core::Ref<IFabricCodePackageActivator>,
eventdesc: *const super::FabricTypes::FABRIC_CODE_PACKAGE_EVENT_DESCRIPTION,
);
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricCodePackageEventHandler_Vtbl {
pub const fn new<Identity: IFabricCodePackageEventHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnCodePackageEvent<
Identity: IFabricCodePackageEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
eventdesc: *const super::FabricTypes::FABRIC_CODE_PACKAGE_EVENT_DESCRIPTION,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricCodePackageEventHandler_Impl::OnCodePackageEvent(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&eventdesc),
);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnCodePackageEvent: OnCodePackageEvent::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricCodePackageEventHandler as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricCodePackageEventHandler {}
windows_core::imp::define_interface!(
IFabricConfigurationPackage,
IFabricConfigurationPackage_Vtbl,
0xac4c3bfa_2563_46b7_a71d_2dca7b0a8f4d
);
windows_core::imp::interface_hierarchy!(IFabricConfigurationPackage, windows_core::IUnknown);
impl IFabricConfigurationPackage {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Description(
&self,
) -> *const super::FabricTypes::FABRIC_CONFIGURATION_PACKAGE_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_Description)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_Path(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_Path)(windows_core::Interface::as_raw(self))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Settings(&self) -> *const super::FabricTypes::FABRIC_CONFIGURATION_SETTINGS {
unsafe {
(windows_core::Interface::vtable(self).get_Settings)(windows_core::Interface::as_raw(
self,
))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetSection<P0>(
&self,
sectionname: P0,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_CONFIGURATION_SECTION>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetSection)(
windows_core::Interface::as_raw(self),
sectionname.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn GetValue<P0, P1>(
&self,
sectionname: P0,
parametername: P1,
isencrypted: *mut bool,
) -> windows_core::Result<windows_core::PCWSTR>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetValue)(
windows_core::Interface::as_raw(self),
sectionname.param().abi(),
parametername.param().abi(),
isencrypted as _,
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn DecryptValue<P0>(
&self,
encryptedvalue: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).DecryptValue)(
windows_core::Interface::as_raw(self),
encryptedvalue.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricConfigurationPackage_Vtbl { pub base__ : windows_core::IUnknown_Vtbl , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_Description : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_CONFIGURATION_PACKAGE_DESCRIPTION , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_Description : usize , pub get_Path : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> windows_core::PCWSTR , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_Settings : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_CONFIGURATION_SETTINGS , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_Settings : usize , # [cfg (feature = "ServiceFabric_FabricTypes")] pub GetSection : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut super::FabricTypes::FABRIC_CONFIGURATION_SECTION) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] GetSection : usize , pub GetValue : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , windows_core::PCWSTR , * mut bool , * mut windows_core::PCWSTR) -> windows_core::HRESULT , # [cfg (feature = "ServiceFabric_FabricCommon")] pub DecryptValue : unsafe extern "system" fn (* mut core::ffi::c_void , windows_core::PCWSTR , * mut * mut core::ffi::c_void) -> windows_core::HRESULT , # [cfg (not (feature = "ServiceFabric_FabricCommon"))] DecryptValue : usize , }
unsafe impl Send for IFabricConfigurationPackage {}
unsafe impl Sync for IFabricConfigurationPackage {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricConfigurationPackage_Impl: windows_core::IUnknownImpl {
fn get_Description(
&self,
) -> *const super::FabricTypes::FABRIC_CONFIGURATION_PACKAGE_DESCRIPTION;
fn get_Path(&self) -> windows_core::PCWSTR;
fn get_Settings(&self) -> *const super::FabricTypes::FABRIC_CONFIGURATION_SETTINGS;
fn GetSection(
&self,
sectionname: &windows_core::PCWSTR,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_CONFIGURATION_SECTION>;
fn GetValue(
&self,
sectionname: &windows_core::PCWSTR,
parametername: &windows_core::PCWSTR,
isencrypted: *mut bool,
) -> windows_core::Result<windows_core::PCWSTR>;
fn DecryptValue(
&self,
encryptedvalue: &windows_core::PCWSTR,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricConfigurationPackage_Vtbl {
pub const fn new<Identity: IFabricConfigurationPackage_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Description<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_CONFIGURATION_PACKAGE_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackage_Impl::get_Description(this)
}
}
unsafe extern "system" fn get_Path<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackage_Impl::get_Path(this)
}
}
unsafe extern "system" fn get_Settings<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_CONFIGURATION_SETTINGS {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackage_Impl::get_Settings(this)
}
}
unsafe extern "system" fn GetSection<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
sectionname: windows_core::PCWSTR,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_CONFIGURATION_SECTION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricConfigurationPackage_Impl::GetSection(
this,
core::mem::transmute(§ionname),
) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetValue<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
sectionname: windows_core::PCWSTR,
parametername: windows_core::PCWSTR,
isencrypted: *mut bool,
bufferedvalue: *mut windows_core::PCWSTR,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricConfigurationPackage_Impl::GetValue(
this,
core::mem::transmute(§ionname),
core::mem::transmute(¶metername),
core::mem::transmute_copy(&isencrypted),
) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn DecryptValue<
Identity: IFabricConfigurationPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
encryptedvalue: windows_core::PCWSTR,
decryptedvalue: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricConfigurationPackage_Impl::DecryptValue(
this,
core::mem::transmute(&encryptedvalue),
) {
Ok(ok__) => {
decryptedvalue.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Description: get_Description::<Identity, OFFSET>,
get_Path: get_Path::<Identity, OFFSET>,
get_Settings: get_Settings::<Identity, OFFSET>,
GetSection: GetSection::<Identity, OFFSET>,
GetValue: GetValue::<Identity, OFFSET>,
DecryptValue: DecryptValue::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricConfigurationPackage as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricConfigurationPackage {}
windows_core::imp::define_interface!(
IFabricConfigurationPackage2,
IFabricConfigurationPackage2_Vtbl,
0xd3161f31_708a_4f83_91ff_f2af15f74a2f
);
impl core::ops::Deref for IFabricConfigurationPackage2 {
type Target = IFabricConfigurationPackage;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricConfigurationPackage2,
windows_core::IUnknown,
IFabricConfigurationPackage
);
impl IFabricConfigurationPackage2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetValues<P0, P1>(
&self,
sectionname: P0,
parameterprefix: P1,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_CONFIGURATION_PARAMETER_LIST>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetValues)(
windows_core::Interface::as_raw(self),
sectionname.param().abi(),
parameterprefix.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricConfigurationPackage2_Vtbl {
pub base__: IFabricConfigurationPackage_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetValues: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
windows_core::PCWSTR,
*mut *mut super::FabricTypes::FABRIC_CONFIGURATION_PARAMETER_LIST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetValues: usize,
}
unsafe impl Send for IFabricConfigurationPackage2 {}
unsafe impl Sync for IFabricConfigurationPackage2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricConfigurationPackage2_Impl: IFabricConfigurationPackage_Impl {
fn GetValues(
&self,
sectionname: &windows_core::PCWSTR,
parameterprefix: &windows_core::PCWSTR,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_CONFIGURATION_PARAMETER_LIST>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricConfigurationPackage2_Vtbl {
pub const fn new<Identity: IFabricConfigurationPackage2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetValues<
Identity: IFabricConfigurationPackage2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
sectionname: windows_core::PCWSTR,
parameterprefix: windows_core::PCWSTR,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_CONFIGURATION_PARAMETER_LIST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricConfigurationPackage2_Impl::GetValues(
this,
core::mem::transmute(§ionname),
core::mem::transmute(¶meterprefix),
) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricConfigurationPackage_Vtbl::new::<Identity, OFFSET>(),
GetValues: GetValues::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricConfigurationPackage2 as windows_core::Interface>::IID
|| iid == &<IFabricConfigurationPackage as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricConfigurationPackage2 {}
windows_core::imp::define_interface!(
IFabricConfigurationPackageChangeHandler,
IFabricConfigurationPackageChangeHandler_Vtbl,
0xc3954d48_b5ee_4ff4_9bc0_c30f6d0d3a85
);
windows_core::imp::interface_hierarchy!(
IFabricConfigurationPackageChangeHandler,
windows_core::IUnknown
);
impl IFabricConfigurationPackageChangeHandler {
pub unsafe fn OnPackageAdded<P0, P1>(&self, source: P0, configpackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricConfigurationPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageAdded)(
windows_core::Interface::as_raw(self),
source.param().abi(),
configpackage.param().abi(),
);
}
}
pub unsafe fn OnPackageRemoved<P0, P1>(&self, source: P0, configpackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricConfigurationPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageRemoved)(
windows_core::Interface::as_raw(self),
source.param().abi(),
configpackage.param().abi(),
);
}
}
pub unsafe fn OnPackageModified<P0, P1, P2>(
&self,
source: P0,
previousconfigpackage: P1,
configpackage: P2,
) where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricConfigurationPackage>,
P2: windows_core::Param<IFabricConfigurationPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageModified)(
windows_core::Interface::as_raw(self),
source.param().abi(),
previousconfigpackage.param().abi(),
configpackage.param().abi(),
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricConfigurationPackageChangeHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnPackageAdded: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageRemoved: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageModified: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
}
unsafe impl Send for IFabricConfigurationPackageChangeHandler {}
unsafe impl Sync for IFabricConfigurationPackageChangeHandler {}
pub trait IFabricConfigurationPackageChangeHandler_Impl: windows_core::IUnknownImpl {
fn OnPackageAdded(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
configpackage: windows_core::Ref<IFabricConfigurationPackage>,
);
fn OnPackageRemoved(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
configpackage: windows_core::Ref<IFabricConfigurationPackage>,
);
fn OnPackageModified(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
previousconfigpackage: windows_core::Ref<IFabricConfigurationPackage>,
configpackage: windows_core::Ref<IFabricConfigurationPackage>,
);
}
impl IFabricConfigurationPackageChangeHandler_Vtbl {
pub const fn new<
Identity: IFabricConfigurationPackageChangeHandler_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn OnPackageAdded<
Identity: IFabricConfigurationPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
configpackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackageChangeHandler_Impl::OnPackageAdded(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&configpackage),
);
}
}
unsafe extern "system" fn OnPackageRemoved<
Identity: IFabricConfigurationPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
configpackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackageChangeHandler_Impl::OnPackageRemoved(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&configpackage),
);
}
}
unsafe extern "system" fn OnPackageModified<
Identity: IFabricConfigurationPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
previousconfigpackage: *mut core::ffi::c_void,
configpackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricConfigurationPackageChangeHandler_Impl::OnPackageModified(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&previousconfigpackage),
core::mem::transmute_copy(&configpackage),
);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnPackageAdded: OnPackageAdded::<Identity, OFFSET>,
OnPackageRemoved: OnPackageRemoved::<Identity, OFFSET>,
OnPackageModified: OnPackageModified::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricConfigurationPackageChangeHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricConfigurationPackageChangeHandler {}
windows_core::imp::define_interface!(
IFabricDataPackage,
IFabricDataPackage_Vtbl,
0xaa67de09_3657_435f_a2f6_b3a17a0a4371
);
windows_core::imp::interface_hierarchy!(IFabricDataPackage, windows_core::IUnknown);
impl IFabricDataPackage {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Description(
&self,
) -> *const super::FabricTypes::FABRIC_DATA_PACKAGE_DESCRIPTION {
unsafe {
(windows_core::Interface::vtable(self).get_Description)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_Path(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_Path)(windows_core::Interface::as_raw(self))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricDataPackage_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_Description:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_DATA_PACKAGE_DESCRIPTION,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_Description: usize,
pub get_Path: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
}
unsafe impl Send for IFabricDataPackage {}
unsafe impl Sync for IFabricDataPackage {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricDataPackage_Impl: windows_core::IUnknownImpl {
fn get_Description(&self) -> *const super::FabricTypes::FABRIC_DATA_PACKAGE_DESCRIPTION;
fn get_Path(&self) -> windows_core::PCWSTR;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricDataPackage_Vtbl {
pub const fn new<Identity: IFabricDataPackage_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Description<
Identity: IFabricDataPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_DATA_PACKAGE_DESCRIPTION {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricDataPackage_Impl::get_Description(this)
}
}
unsafe extern "system" fn get_Path<
Identity: IFabricDataPackage_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricDataPackage_Impl::get_Path(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Description: get_Description::<Identity, OFFSET>,
get_Path: get_Path::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricDataPackage as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricDataPackage {}
windows_core::imp::define_interface!(
IFabricDataPackageChangeHandler,
IFabricDataPackageChangeHandler_Vtbl,
0x8d0a726f_bd17_4b32_807b_be2a8024b2e0
);
windows_core::imp::interface_hierarchy!(IFabricDataPackageChangeHandler, windows_core::IUnknown);
impl IFabricDataPackageChangeHandler {
pub unsafe fn OnPackageAdded<P0, P1>(&self, source: P0, datapackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricDataPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageAdded)(
windows_core::Interface::as_raw(self),
source.param().abi(),
datapackage.param().abi(),
);
}
}
pub unsafe fn OnPackageRemoved<P0, P1>(&self, source: P0, datapackage: P1)
where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricDataPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageRemoved)(
windows_core::Interface::as_raw(self),
source.param().abi(),
datapackage.param().abi(),
);
}
}
pub unsafe fn OnPackageModified<P0, P1, P2>(
&self,
source: P0,
previousdatapackage: P1,
datapackage: P2,
) where
P0: windows_core::Param<IFabricCodePackageActivationContext>,
P1: windows_core::Param<IFabricDataPackage>,
P2: windows_core::Param<IFabricDataPackage>,
{
unsafe {
(windows_core::Interface::vtable(self).OnPackageModified)(
windows_core::Interface::as_raw(self),
source.param().abi(),
previousdatapackage.param().abi(),
datapackage.param().abi(),
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricDataPackageChangeHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnPackageAdded: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageRemoved: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
pub OnPackageModified: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
),
}
unsafe impl Send for IFabricDataPackageChangeHandler {}
unsafe impl Sync for IFabricDataPackageChangeHandler {}
pub trait IFabricDataPackageChangeHandler_Impl: windows_core::IUnknownImpl {
fn OnPackageAdded(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
datapackage: windows_core::Ref<IFabricDataPackage>,
);
fn OnPackageRemoved(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
datapackage: windows_core::Ref<IFabricDataPackage>,
);
fn OnPackageModified(
&self,
source: windows_core::Ref<IFabricCodePackageActivationContext>,
previousdatapackage: windows_core::Ref<IFabricDataPackage>,
datapackage: windows_core::Ref<IFabricDataPackage>,
);
}
impl IFabricDataPackageChangeHandler_Vtbl {
pub const fn new<Identity: IFabricDataPackageChangeHandler_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn OnPackageAdded<
Identity: IFabricDataPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
datapackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricDataPackageChangeHandler_Impl::OnPackageAdded(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&datapackage),
);
}
}
unsafe extern "system" fn OnPackageRemoved<
Identity: IFabricDataPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
datapackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricDataPackageChangeHandler_Impl::OnPackageRemoved(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&datapackage),
);
}
}
unsafe extern "system" fn OnPackageModified<
Identity: IFabricDataPackageChangeHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
source: *mut core::ffi::c_void,
previousdatapackage: *mut core::ffi::c_void,
datapackage: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricDataPackageChangeHandler_Impl::OnPackageModified(
this,
core::mem::transmute_copy(&source),
core::mem::transmute_copy(&previousdatapackage),
core::mem::transmute_copy(&datapackage),
);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnPackageAdded: OnPackageAdded::<Identity, OFFSET>,
OnPackageRemoved: OnPackageRemoved::<Identity, OFFSET>,
OnPackageModified: OnPackageModified::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricDataPackageChangeHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricDataPackageChangeHandler {}
windows_core::imp::define_interface!(
IFabricEseLocalStoreSettingsResult,
IFabricEseLocalStoreSettingsResult_Vtbl,
0xaace77ae_d8e1_4144_b1ee_5ac74fd54f65
);
windows_core::imp::interface_hierarchy!(IFabricEseLocalStoreSettingsResult, windows_core::IUnknown);
impl IFabricEseLocalStoreSettingsResult {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Settings(
&self,
) -> *const super::FabricTypes::FABRIC_ESE_LOCAL_STORE_SETTINGS {
unsafe {
(windows_core::Interface::vtable(self).get_Settings)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricEseLocalStoreSettingsResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_Settings:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_ESE_LOCAL_STORE_SETTINGS,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_Settings: usize,
}
unsafe impl Send for IFabricEseLocalStoreSettingsResult {}
unsafe impl Sync for IFabricEseLocalStoreSettingsResult {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricEseLocalStoreSettingsResult_Impl: windows_core::IUnknownImpl {
fn get_Settings(&self) -> *const super::FabricTypes::FABRIC_ESE_LOCAL_STORE_SETTINGS;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricEseLocalStoreSettingsResult_Vtbl {
pub const fn new<Identity: IFabricEseLocalStoreSettingsResult_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn get_Settings<
Identity: IFabricEseLocalStoreSettingsResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_ESE_LOCAL_STORE_SETTINGS {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricEseLocalStoreSettingsResult_Impl::get_Settings(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Settings: get_Settings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricEseLocalStoreSettingsResult as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricEseLocalStoreSettingsResult {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreEnumerator,
IFabricKeyValueStoreEnumerator_Vtbl,
0x6722b848_15bb_4528_bf54_c7bbe27b6f9a
);
windows_core::imp::interface_hierarchy!(IFabricKeyValueStoreEnumerator, windows_core::IUnknown);
impl IFabricKeyValueStoreEnumerator {
pub unsafe fn EnumerateByKey<P0>(
&self,
keyprefix: P0,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateByKey)(
windows_core::Interface::as_raw(self),
keyprefix.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateMetadataByKey<P0>(
&self,
keyprefix: P0,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateMetadataByKey)(
windows_core::Interface::as_raw(self),
keyprefix.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreEnumerator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub EnumerateByKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateMetadataByKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreEnumerator {}
unsafe impl Sync for IFabricKeyValueStoreEnumerator {}
pub trait IFabricKeyValueStoreEnumerator_Impl: windows_core::IUnknownImpl {
fn EnumerateByKey(
&self,
keyprefix: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateMetadataByKey(
&self,
keyprefix: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>;
}
impl IFabricKeyValueStoreEnumerator_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreEnumerator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EnumerateByKey<
Identity: IFabricKeyValueStoreEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreEnumerator_Impl::EnumerateByKey(
this,
core::mem::transmute(&keyprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateMetadataByKey<
Identity: IFabricKeyValueStoreEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreEnumerator_Impl::EnumerateMetadataByKey(
this,
core::mem::transmute(&keyprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
EnumerateByKey: EnumerateByKey::<Identity, OFFSET>,
EnumerateMetadataByKey: EnumerateMetadataByKey::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreEnumerator {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreEnumerator2,
IFabricKeyValueStoreEnumerator2_Vtbl,
0x63dfd264_4f2b_4be6_8234_1fa200165fe9
);
impl core::ops::Deref for IFabricKeyValueStoreEnumerator2 {
type Target = IFabricKeyValueStoreEnumerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreEnumerator2,
windows_core::IUnknown,
IFabricKeyValueStoreEnumerator
);
impl IFabricKeyValueStoreEnumerator2 {
pub unsafe fn EnumerateByKey2<P0>(
&self,
keyprefix: P0,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateByKey2)(
windows_core::Interface::as_raw(self),
keyprefix.param().abi(),
strictprefix,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateMetadataByKey2<P0>(
&self,
keyprefix: P0,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateMetadataByKey2)(
windows_core::Interface::as_raw(self),
keyprefix.param().abi(),
strictprefix,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreEnumerator2_Vtbl {
pub base__: IFabricKeyValueStoreEnumerator_Vtbl,
pub EnumerateByKey2: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
bool,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateMetadataByKey2: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
bool,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreEnumerator2 {}
unsafe impl Sync for IFabricKeyValueStoreEnumerator2 {}
pub trait IFabricKeyValueStoreEnumerator2_Impl: IFabricKeyValueStoreEnumerator_Impl {
fn EnumerateByKey2(
&self,
keyprefix: &windows_core::PCWSTR,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateMetadataByKey2(
&self,
keyprefix: &windows_core::PCWSTR,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>;
}
impl IFabricKeyValueStoreEnumerator2_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreEnumerator2_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn EnumerateByKey2<
Identity: IFabricKeyValueStoreEnumerator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
strictprefix: bool,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreEnumerator2_Impl::EnumerateByKey2(
this,
core::mem::transmute(&keyprefix),
core::mem::transmute_copy(&strictprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateMetadataByKey2<
Identity: IFabricKeyValueStoreEnumerator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
strictprefix: bool,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreEnumerator2_Impl::EnumerateMetadataByKey2(
this,
core::mem::transmute(&keyprefix),
core::mem::transmute_copy(&strictprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreEnumerator_Vtbl::new::<Identity, OFFSET>(),
EnumerateByKey2: EnumerateByKey2::<Identity, OFFSET>,
EnumerateMetadataByKey2: EnumerateMetadataByKey2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreEnumerator2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreEnumerator2 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemEnumerator,
IFabricKeyValueStoreItemEnumerator_Vtbl,
0xc202788f_54d3_44a6_8f3c_b4bbfcdb95d2
);
windows_core::imp::interface_hierarchy!(IFabricKeyValueStoreItemEnumerator, windows_core::IUnknown);
impl IFabricKeyValueStoreItemEnumerator {
pub unsafe fn MoveNext(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).MoveNext)(windows_core::Interface::as_raw(self))
}
}
pub unsafe fn get_Current(&self) -> Option<IFabricKeyValueStoreItemResult> {
unsafe {
(windows_core::Interface::vtable(self).get_Current)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemEnumerator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub MoveNext: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub get_Current:
unsafe extern "system" fn(*mut core::ffi::c_void) -> Option<IFabricKeyValueStoreItemResult>,
}
unsafe impl Send for IFabricKeyValueStoreItemEnumerator {}
unsafe impl Sync for IFabricKeyValueStoreItemEnumerator {}
pub trait IFabricKeyValueStoreItemEnumerator_Impl: windows_core::IUnknownImpl {
fn MoveNext(&self) -> windows_core::Result<()>;
fn get_Current(&self) -> Option<IFabricKeyValueStoreItemResult>;
}
impl IFabricKeyValueStoreItemEnumerator_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreItemEnumerator_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn MoveNext<
Identity: IFabricKeyValueStoreItemEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemEnumerator_Impl::MoveNext(this).into()
}
}
unsafe extern "system" fn get_Current<
Identity: IFabricKeyValueStoreItemEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> Option<IFabricKeyValueStoreItemResult> {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemEnumerator_Impl::get_Current(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
MoveNext: MoveNext::<Identity, OFFSET>,
get_Current: get_Current::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreItemEnumerator {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemEnumerator2,
IFabricKeyValueStoreItemEnumerator2_Vtbl,
0xda143bbc_81e1_48cd_afd7_b642bc5b9bfd
);
impl core::ops::Deref for IFabricKeyValueStoreItemEnumerator2 {
type Target = IFabricKeyValueStoreItemEnumerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreItemEnumerator2,
windows_core::IUnknown,
IFabricKeyValueStoreItemEnumerator
);
impl IFabricKeyValueStoreItemEnumerator2 {
pub unsafe fn TryMoveNext(&self) -> windows_core::Result<bool> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryMoveNext)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemEnumerator2_Vtbl {
pub base__: IFabricKeyValueStoreItemEnumerator_Vtbl,
pub TryMoveNext:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreItemEnumerator2 {}
unsafe impl Sync for IFabricKeyValueStoreItemEnumerator2 {}
pub trait IFabricKeyValueStoreItemEnumerator2_Impl:
IFabricKeyValueStoreItemEnumerator_Impl
{
fn TryMoveNext(&self) -> windows_core::Result<bool>;
}
impl IFabricKeyValueStoreItemEnumerator2_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreItemEnumerator2_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn TryMoveNext<
Identity: IFabricKeyValueStoreItemEnumerator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
success: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreItemEnumerator2_Impl::TryMoveNext(this) {
Ok(ok__) => {
success.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreItemEnumerator_Vtbl::new::<Identity, OFFSET>(),
TryMoveNext: TryMoveNext::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemEnumerator2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreItemEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreItemEnumerator2 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemMetadataEnumerator,
IFabricKeyValueStoreItemMetadataEnumerator_Vtbl,
0x0bc06aee_fffa_4450_9099_116a5f0e0b53
);
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreItemMetadataEnumerator,
windows_core::IUnknown
);
impl IFabricKeyValueStoreItemMetadataEnumerator {
pub unsafe fn MoveNext(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).MoveNext)(windows_core::Interface::as_raw(self))
}
}
pub unsafe fn get_Current(&self) -> Option<IFabricKeyValueStoreItemMetadataResult> {
unsafe {
(windows_core::Interface::vtable(self).get_Current)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemMetadataEnumerator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub MoveNext: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub get_Current: unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> Option<IFabricKeyValueStoreItemMetadataResult>,
}
unsafe impl Send for IFabricKeyValueStoreItemMetadataEnumerator {}
unsafe impl Sync for IFabricKeyValueStoreItemMetadataEnumerator {}
pub trait IFabricKeyValueStoreItemMetadataEnumerator_Impl: windows_core::IUnknownImpl {
fn MoveNext(&self) -> windows_core::Result<()>;
fn get_Current(&self) -> Option<IFabricKeyValueStoreItemMetadataResult>;
}
impl IFabricKeyValueStoreItemMetadataEnumerator_Vtbl {
pub const fn new<
Identity: IFabricKeyValueStoreItemMetadataEnumerator_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn MoveNext<
Identity: IFabricKeyValueStoreItemMetadataEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemMetadataEnumerator_Impl::MoveNext(this).into()
}
}
unsafe extern "system" fn get_Current<
Identity: IFabricKeyValueStoreItemMetadataEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> Option<IFabricKeyValueStoreItemMetadataResult> {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemMetadataEnumerator_Impl::get_Current(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
MoveNext: MoveNext::<Identity, OFFSET>,
get_Current: get_Current::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemMetadataEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreItemMetadataEnumerator {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemMetadataEnumerator2,
IFabricKeyValueStoreItemMetadataEnumerator2_Vtbl,
0x8803d53e_dd73_40fc_a662_1bfe999419ea
);
impl core::ops::Deref for IFabricKeyValueStoreItemMetadataEnumerator2 {
type Target = IFabricKeyValueStoreItemMetadataEnumerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreItemMetadataEnumerator2,
windows_core::IUnknown,
IFabricKeyValueStoreItemMetadataEnumerator
);
impl IFabricKeyValueStoreItemMetadataEnumerator2 {
pub unsafe fn TryMoveNext(&self) -> windows_core::Result<bool> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryMoveNext)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemMetadataEnumerator2_Vtbl {
pub base__: IFabricKeyValueStoreItemMetadataEnumerator_Vtbl,
pub TryMoveNext:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreItemMetadataEnumerator2 {}
unsafe impl Sync for IFabricKeyValueStoreItemMetadataEnumerator2 {}
pub trait IFabricKeyValueStoreItemMetadataEnumerator2_Impl:
IFabricKeyValueStoreItemMetadataEnumerator_Impl
{
fn TryMoveNext(&self) -> windows_core::Result<bool>;
}
impl IFabricKeyValueStoreItemMetadataEnumerator2_Vtbl {
pub const fn new<
Identity: IFabricKeyValueStoreItemMetadataEnumerator2_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn TryMoveNext<
Identity: IFabricKeyValueStoreItemMetadataEnumerator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
success: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreItemMetadataEnumerator2_Impl::TryMoveNext(this) {
Ok(ok__) => {
success.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreItemMetadataEnumerator_Vtbl::new::<Identity, OFFSET>(),
TryMoveNext: TryMoveNext::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemMetadataEnumerator2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreItemMetadataEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreItemMetadataEnumerator2 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemMetadataResult,
IFabricKeyValueStoreItemMetadataResult_Vtbl,
0x17c483a1_69e6_4bdc_a058_54fd4a1839fd
);
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreItemMetadataResult,
windows_core::IUnknown
);
impl IFabricKeyValueStoreItemMetadataResult {
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub unsafe fn get_Metadata(
&self,
) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM_METADATA {
unsafe {
(windows_core::Interface::vtable(self).get_Metadata)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemMetadataResult_Vtbl { pub base__ : windows_core::IUnknown_Vtbl , # [cfg (all (feature = "ServiceFabric_FabricTypes" , feature = "Win32"))] pub get_Metadata : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM_METADATA , # [cfg (not (all (feature = "ServiceFabric_FabricTypes" , feature = "Win32")))] get_Metadata : usize , }
unsafe impl Send for IFabricKeyValueStoreItemMetadataResult {}
unsafe impl Sync for IFabricKeyValueStoreItemMetadataResult {}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub trait IFabricKeyValueStoreItemMetadataResult_Impl: windows_core::IUnknownImpl {
fn get_Metadata(&self) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM_METADATA;
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl IFabricKeyValueStoreItemMetadataResult_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreItemMetadataResult_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn get_Metadata<
Identity: IFabricKeyValueStoreItemMetadataResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM_METADATA {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemMetadataResult_Impl::get_Metadata(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Metadata: get_Metadata::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemMetadataResult as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl windows_core::RuntimeName for IFabricKeyValueStoreItemMetadataResult {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreItemResult,
IFabricKeyValueStoreItemResult_Vtbl,
0xc1f1c89d_b0b8_44dc_bc97_6c074c1a805e
);
windows_core::imp::interface_hierarchy!(IFabricKeyValueStoreItemResult, windows_core::IUnknown);
impl IFabricKeyValueStoreItemResult {
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub unsafe fn get_Item(&self) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM {
unsafe {
(windows_core::Interface::vtable(self).get_Item)(windows_core::Interface::as_raw(self))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreItemResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub get_Item:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM,
#[cfg(not(all(feature = "ServiceFabric_FabricTypes", feature = "Win32")))]
get_Item: usize,
}
unsafe impl Send for IFabricKeyValueStoreItemResult {}
unsafe impl Sync for IFabricKeyValueStoreItemResult {}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub trait IFabricKeyValueStoreItemResult_Impl: windows_core::IUnknownImpl {
fn get_Item(&self) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM;
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl IFabricKeyValueStoreItemResult_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreItemResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Item<
Identity: IFabricKeyValueStoreItemResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_ITEM {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreItemResult_Impl::get_Item(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Item: get_Item::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreItemResult as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl windows_core::RuntimeName for IFabricKeyValueStoreItemResult {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreNotification,
IFabricKeyValueStoreNotification_Vtbl,
0xcb660aa6_c51e_4f05_9526_93982b550e8f
);
impl core::ops::Deref for IFabricKeyValueStoreNotification {
type Target = IFabricKeyValueStoreItemResult;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreNotification,
windows_core::IUnknown,
IFabricKeyValueStoreItemResult
);
impl IFabricKeyValueStoreNotification {
pub unsafe fn IsDelete(&self) -> bool {
unsafe {
(windows_core::Interface::vtable(self).IsDelete)(windows_core::Interface::as_raw(self))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreNotification_Vtbl {
pub base__: IFabricKeyValueStoreItemResult_Vtbl,
pub IsDelete: unsafe extern "system" fn(*mut core::ffi::c_void) -> bool,
}
unsafe impl Send for IFabricKeyValueStoreNotification {}
unsafe impl Sync for IFabricKeyValueStoreNotification {}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
pub trait IFabricKeyValueStoreNotification_Impl: IFabricKeyValueStoreItemResult_Impl {
fn IsDelete(&self) -> bool;
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl IFabricKeyValueStoreNotification_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreNotification_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn IsDelete<
Identity: IFabricKeyValueStoreNotification_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> bool {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreNotification_Impl::IsDelete(this)
}
}
Self {
base__: IFabricKeyValueStoreItemResult_Vtbl::new::<Identity, OFFSET>(),
IsDelete: IsDelete::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreNotification as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreItemResult as windows_core::Interface>::IID
}
}
#[cfg(all(feature = "ServiceFabric_FabricTypes", feature = "Win32"))]
impl windows_core::RuntimeName for IFabricKeyValueStoreNotification {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreNotificationEnumerator,
IFabricKeyValueStoreNotificationEnumerator_Vtbl,
0xef25bc08_be76_43c7_adad_20f01fba3399
);
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreNotificationEnumerator,
windows_core::IUnknown
);
impl IFabricKeyValueStoreNotificationEnumerator {
pub unsafe fn MoveNext(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).MoveNext)(windows_core::Interface::as_raw(self))
}
}
pub unsafe fn get_Current(&self) -> Option<IFabricKeyValueStoreNotification> {
unsafe {
(windows_core::Interface::vtable(self).get_Current)(windows_core::Interface::as_raw(
self,
))
}
}
pub unsafe fn Reset(&self) {
unsafe {
(windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreNotificationEnumerator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub MoveNext: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub get_Current: unsafe extern "system" fn(
*mut core::ffi::c_void,
) -> Option<IFabricKeyValueStoreNotification>,
pub Reset: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricKeyValueStoreNotificationEnumerator {}
unsafe impl Sync for IFabricKeyValueStoreNotificationEnumerator {}
pub trait IFabricKeyValueStoreNotificationEnumerator_Impl: windows_core::IUnknownImpl {
fn MoveNext(&self) -> windows_core::Result<()>;
fn get_Current(&self) -> Option<IFabricKeyValueStoreNotification>;
fn Reset(&self);
}
impl IFabricKeyValueStoreNotificationEnumerator_Vtbl {
pub const fn new<
Identity: IFabricKeyValueStoreNotificationEnumerator_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn MoveNext<
Identity: IFabricKeyValueStoreNotificationEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreNotificationEnumerator_Impl::MoveNext(this).into()
}
}
unsafe extern "system" fn get_Current<
Identity: IFabricKeyValueStoreNotificationEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> Option<IFabricKeyValueStoreNotification> {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreNotificationEnumerator_Impl::get_Current(this)
}
}
unsafe extern "system" fn Reset<
Identity: IFabricKeyValueStoreNotificationEnumerator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreNotificationEnumerator_Impl::Reset(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
MoveNext: MoveNext::<Identity, OFFSET>,
get_Current: get_Current::<Identity, OFFSET>,
Reset: Reset::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreNotificationEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreNotificationEnumerator {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreNotificationEnumerator2,
IFabricKeyValueStoreNotificationEnumerator2_Vtbl,
0x55eec7c6_ae81_407a_b84c_22771d314ac7
);
impl core::ops::Deref for IFabricKeyValueStoreNotificationEnumerator2 {
type Target = IFabricKeyValueStoreNotificationEnumerator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreNotificationEnumerator2,
windows_core::IUnknown,
IFabricKeyValueStoreNotificationEnumerator
);
impl IFabricKeyValueStoreNotificationEnumerator2 {
pub unsafe fn TryMoveNext(&self) -> windows_core::Result<bool> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryMoveNext)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreNotificationEnumerator2_Vtbl {
pub base__: IFabricKeyValueStoreNotificationEnumerator_Vtbl,
pub TryMoveNext:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreNotificationEnumerator2 {}
unsafe impl Sync for IFabricKeyValueStoreNotificationEnumerator2 {}
pub trait IFabricKeyValueStoreNotificationEnumerator2_Impl:
IFabricKeyValueStoreNotificationEnumerator_Impl
{
fn TryMoveNext(&self) -> windows_core::Result<bool>;
}
impl IFabricKeyValueStoreNotificationEnumerator2_Vtbl {
pub const fn new<
Identity: IFabricKeyValueStoreNotificationEnumerator2_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn TryMoveNext<
Identity: IFabricKeyValueStoreNotificationEnumerator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
success: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreNotificationEnumerator2_Impl::TryMoveNext(this) {
Ok(ok__) => {
success.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreNotificationEnumerator_Vtbl::new::<Identity, OFFSET>(),
TryMoveNext: TryMoveNext::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreNotificationEnumerator2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreNotificationEnumerator as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricKeyValueStoreNotificationEnumerator2 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica_Vtbl,
0x97da35c4_38ed_4a2a_8f37_fbeb56382235
);
impl core::ops::Deref for IFabricKeyValueStoreReplica {
type Target = IFabricStatefulServiceReplica;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica,
windows_core::IUnknown,
IFabricStatefulServiceReplica
);
impl IFabricKeyValueStoreReplica {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetCurrentEpoch(
&self,
currentepoch: *mut super::FabricTypes::FABRIC_EPOCH,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).GetCurrentEpoch)(
windows_core::Interface::as_raw(self),
currentepoch as _,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn UpdateReplicatorSettings(
&self,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UpdateReplicatorSettings)(
windows_core::Interface::as_raw(self),
replicatorsettings,
)
}
}
pub unsafe fn CreateTransaction(&self) -> windows_core::Result<IFabricTransaction> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateTransaction)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn Add<P0, P1>(
&self,
transaction: P0,
key: P1,
valuesizeinbytes: i32,
value: *const u8,
) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).Add)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
valuesizeinbytes,
value,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn Remove<P0, P1>(
&self,
transaction: P0,
key: P1,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).Remove)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
checksequencenumber,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn Update<P0, P1>(
&self,
transaction: P0,
key: P1,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).Update)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
valuesizeinbytes,
value,
checksequencenumber,
)
}
}
pub unsafe fn Get<P0, P1>(
&self,
transaction: P0,
key: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemResult>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Get)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn GetMetadata<P0, P1>(
&self,
transaction: P0,
key: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataResult>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetMetadata)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn Contains<P0, P1>(&self, transaction: P0, key: P1) -> windows_core::Result<bool>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Contains)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn Enumerate<P0>(
&self,
transaction: P0,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).Enumerate)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateByKey<P0, P1>(
&self,
transaction: P0,
keyprefix: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateByKey)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
keyprefix.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateMetadata<P0>(
&self,
transaction: P0,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateMetadata)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateMetadataByKey<P0, P1>(
&self,
transaction: P0,
keyprefix: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateMetadataByKey)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
keyprefix.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica_Vtbl {
pub base__: IFabricStatefulServiceReplica_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetCurrentEpoch: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_EPOCH,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetCurrentEpoch: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub UpdateReplicatorSettings: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
UpdateReplicatorSettings: usize,
pub CreateTransaction: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Add: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
i32,
*const u8,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub Remove: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
Remove: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub Update: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
i32,
*const u8,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
Update: usize,
pub Get: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub GetMetadata: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Contains: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut bool,
) -> windows_core::HRESULT,
pub Enumerate: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateByKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateMetadata: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateMetadataByKey: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreReplica {}
unsafe impl Sync for IFabricKeyValueStoreReplica {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica_Impl: IFabricStatefulServiceReplica_Impl {
fn GetCurrentEpoch(
&self,
currentepoch: *mut super::FabricTypes::FABRIC_EPOCH,
) -> windows_core::Result<()>;
fn UpdateReplicatorSettings(
&self,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::Result<()>;
fn CreateTransaction(&self) -> windows_core::Result<IFabricTransaction>;
fn Add(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
) -> windows_core::Result<()>;
fn Remove(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<()>;
fn Update(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<()>;
fn Get(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemResult>;
fn GetMetadata(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataResult>;
fn Contains(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
) -> windows_core::Result<bool>;
fn Enumerate(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateByKey(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
keyprefix: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateMetadata(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>;
fn EnumerateMetadataByKey(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
keyprefix: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetCurrentEpoch<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
currentepoch: *mut super::FabricTypes::FABRIC_EPOCH,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica_Impl::GetCurrentEpoch(
this,
core::mem::transmute_copy(¤tepoch),
)
.into()
}
}
unsafe extern "system" fn UpdateReplicatorSettings<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica_Impl::UpdateReplicatorSettings(
this,
core::mem::transmute_copy(&replicatorsettings),
)
.into()
}
}
unsafe extern "system" fn CreateTransaction<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::CreateTransaction(this) {
Ok(ok__) => {
transaction.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Add<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica_Impl::Add(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&valuesizeinbytes),
core::mem::transmute_copy(&value),
)
.into()
}
}
unsafe extern "system" fn Remove<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica_Impl::Remove(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&checksequencenumber),
)
.into()
}
}
unsafe extern "system" fn Update<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica_Impl::Update(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&valuesizeinbytes),
core::mem::transmute_copy(&value),
core::mem::transmute_copy(&checksequencenumber),
)
.into()
}
}
unsafe extern "system" fn Get<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::Get(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetMetadata<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::GetMetadata(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Contains<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
result: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::Contains(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
) {
Ok(ok__) => {
result.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Enumerate<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::Enumerate(
this,
core::mem::transmute_copy(&transaction),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateByKey<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::EnumerateByKey(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&keyprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateMetadata<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::EnumerateMetadata(
this,
core::mem::transmute_copy(&transaction),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateMetadataByKey<
Identity: IFabricKeyValueStoreReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica_Impl::EnumerateMetadataByKey(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&keyprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricStatefulServiceReplica_Vtbl::new::<Identity, OFFSET>(),
GetCurrentEpoch: GetCurrentEpoch::<Identity, OFFSET>,
UpdateReplicatorSettings: UpdateReplicatorSettings::<Identity, OFFSET>,
CreateTransaction: CreateTransaction::<Identity, OFFSET>,
Add: Add::<Identity, OFFSET>,
Remove: Remove::<Identity, OFFSET>,
Update: Update::<Identity, OFFSET>,
Get: Get::<Identity, OFFSET>,
GetMetadata: GetMetadata::<Identity, OFFSET>,
Contains: Contains::<Identity, OFFSET>,
Enumerate: Enumerate::<Identity, OFFSET>,
EnumerateByKey: EnumerateByKey::<Identity, OFFSET>,
EnumerateMetadata: EnumerateMetadata::<Identity, OFFSET>,
EnumerateMetadataByKey: EnumerateMetadataByKey::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica2_Vtbl,
0xfef805b2_5aca_4caa_9c51_fb3bd577a792
);
impl core::ops::Deref for IFabricKeyValueStoreReplica2 {
type Target = IFabricKeyValueStoreReplica;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica2,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica
);
impl IFabricKeyValueStoreReplica2 {
pub unsafe fn Backup<P0>(&self, backupdirectory: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).Backup)(
windows_core::Interface::as_raw(self),
backupdirectory.param().abi(),
)
}
}
pub unsafe fn Restore<P0>(&self, backupdirectory: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).Restore)(
windows_core::Interface::as_raw(self),
backupdirectory.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateTransaction2(
&self,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_TRANSACTION_SETTINGS,
) -> windows_core::Result<IFabricTransaction> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateTransaction2)(
windows_core::Interface::as_raw(self),
settings,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica2_Vtbl {
pub base__: IFabricKeyValueStoreReplica_Vtbl,
pub Backup: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
) -> windows_core::HRESULT,
pub Restore: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateTransaction2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_KEY_VALUE_STORE_TRANSACTION_SETTINGS,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateTransaction2: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica2 {}
unsafe impl Sync for IFabricKeyValueStoreReplica2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica2_Impl: IFabricKeyValueStoreReplica_Impl {
fn Backup(&self, backupdirectory: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn Restore(&self, backupdirectory: &windows_core::PCWSTR) -> windows_core::Result<()>;
fn CreateTransaction2(
&self,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_TRANSACTION_SETTINGS,
) -> windows_core::Result<IFabricTransaction>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica2_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Backup<
Identity: IFabricKeyValueStoreReplica2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
backupdirectory: windows_core::PCWSTR,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica2_Impl::Backup(
this,
core::mem::transmute(&backupdirectory),
)
.into()
}
}
unsafe extern "system" fn Restore<
Identity: IFabricKeyValueStoreReplica2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
backupdirectory: windows_core::PCWSTR,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica2_Impl::Restore(
this,
core::mem::transmute(&backupdirectory),
)
.into()
}
}
unsafe extern "system" fn CreateTransaction2<
Identity: IFabricKeyValueStoreReplica2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_TRANSACTION_SETTINGS,
transaction: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica2_Impl::CreateTransaction2(
this,
core::mem::transmute_copy(&settings),
) {
Ok(ok__) => {
transaction.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreReplica_Vtbl::new::<Identity, OFFSET>(),
Backup: Backup::<Identity, OFFSET>,
Restore: Restore::<Identity, OFFSET>,
CreateTransaction2: CreateTransaction2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica2 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica3,
IFabricKeyValueStoreReplica3_Vtbl,
0xc1297172_a8aa_4096_bdcc_1ece0c5d8c8f
);
impl core::ops::Deref for IFabricKeyValueStoreReplica3 {
type Target = IFabricKeyValueStoreReplica2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica3,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2
);
impl IFabricKeyValueStoreReplica3 {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginBackup<P0, P2, P3>(
&self,
backupdirectory: P0,
backupoption: super::FabricTypes::FABRIC_STORE_BACKUP_OPTION,
postbackuphandler: P2,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<IFabricStorePostBackupHandler>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginBackup)(
windows_core::Interface::as_raw(self),
backupdirectory.param().abi(),
backupoption,
postbackuphandler.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndBackup<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndBackup)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica3_Vtbl {
pub base__: IFabricKeyValueStoreReplica2_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginBackup: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_STORE_BACKUP_OPTION,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginBackup: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndBackup: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndBackup: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica3 {}
unsafe impl Sync for IFabricKeyValueStoreReplica3 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica3_Impl: IFabricKeyValueStoreReplica2_Impl {
fn BeginBackup(
&self,
backupdirectory: &windows_core::PCWSTR,
backupoption: super::FabricTypes::FABRIC_STORE_BACKUP_OPTION,
postbackuphandler: windows_core::Ref<IFabricStorePostBackupHandler>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndBackup(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica3_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginBackup<
Identity: IFabricKeyValueStoreReplica3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
backupdirectory: windows_core::PCWSTR,
backupoption: super::FabricTypes::FABRIC_STORE_BACKUP_OPTION,
postbackuphandler: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica3_Impl::BeginBackup(
this,
core::mem::transmute(&backupdirectory),
core::mem::transmute_copy(&backupoption),
core::mem::transmute_copy(&postbackuphandler),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndBackup<
Identity: IFabricKeyValueStoreReplica3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica3_Impl::EndBackup(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
Self {
base__: IFabricKeyValueStoreReplica2_Vtbl::new::<Identity, OFFSET>(),
BeginBackup: BeginBackup::<Identity, OFFSET>,
EndBackup: EndBackup::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica3 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica4,
IFabricKeyValueStoreReplica4_Vtbl,
0xff16d2f1_41a9_4c64_804a_a20bf28c04f3
);
impl core::ops::Deref for IFabricKeyValueStoreReplica4 {
type Target = IFabricKeyValueStoreReplica3;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica4,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica3
);
impl IFabricKeyValueStoreReplica4 {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginRestore<P0, P1>(
&self,
backupdirectory: P0,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRestore)(
windows_core::Interface::as_raw(self),
backupdirectory.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndRestore<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndRestore)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica4_Vtbl {
pub base__: IFabricKeyValueStoreReplica3_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginRestore: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginRestore: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndRestore: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndRestore: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica4 {}
unsafe impl Sync for IFabricKeyValueStoreReplica4 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica4_Impl: IFabricKeyValueStoreReplica3_Impl {
fn BeginRestore(
&self,
backupdirectory: &windows_core::PCWSTR,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndRestore(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica4_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica4_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginRestore<
Identity: IFabricKeyValueStoreReplica4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
backupdirectory: windows_core::PCWSTR,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica4_Impl::BeginRestore(
this,
core::mem::transmute(&backupdirectory),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndRestore<
Identity: IFabricKeyValueStoreReplica4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricKeyValueStoreReplica4_Impl::EndRestore(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
Self {
base__: IFabricKeyValueStoreReplica3_Vtbl::new::<Identity, OFFSET>(),
BeginRestore: BeginRestore::<Identity, OFFSET>,
EndRestore: EndRestore::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica4 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica4 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica5,
IFabricKeyValueStoreReplica5_Vtbl,
0x34f2da40_6227_448a_be72_c517b0d69432
);
impl core::ops::Deref for IFabricKeyValueStoreReplica5 {
type Target = IFabricKeyValueStoreReplica4;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica5,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica3,
IFabricKeyValueStoreReplica4
);
impl IFabricKeyValueStoreReplica5 {
pub unsafe fn TryAdd<P0, P1>(
&self,
transaction: P0,
key: P1,
valuesizeinbytes: i32,
value: *const u8,
) -> windows_core::Result<bool>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryAdd)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
valuesizeinbytes,
value,
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn TryRemove<P0, P1>(
&self,
transaction: P0,
key: P1,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<bool>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryRemove)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
checksequencenumber,
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn TryUpdate<P0, P1>(
&self,
transaction: P0,
key: P1,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<bool>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryUpdate)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
valuesizeinbytes,
value,
checksequencenumber,
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn TryGet<P0, P1>(
&self,
transaction: P0,
key: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemResult>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryGet)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn TryGetMetadata<P0, P1>(
&self,
transaction: P0,
key: P1,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataResult>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryGetMetadata)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
key.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateByKey2<P0, P1>(
&self,
transaction: P0,
keyprefix: P1,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateByKey2)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
keyprefix.param().abi(),
strictprefix,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn EnumerateMetadataByKey2<P0, P1>(
&self,
transaction: P0,
keyprefix: P1,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
P1: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateMetadataByKey2)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
keyprefix.param().abi(),
strictprefix,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica5_Vtbl {
pub base__: IFabricKeyValueStoreReplica4_Vtbl,
pub TryAdd: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
i32,
*const u8,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub TryRemove: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
TryRemove: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub TryUpdate: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
i32,
*const u8,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
TryUpdate: usize,
pub TryGet: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub TryGetMetadata: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateByKey2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
bool,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EnumerateMetadataByKey2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows_core::PCWSTR,
bool,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricKeyValueStoreReplica5 {}
unsafe impl Sync for IFabricKeyValueStoreReplica5 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica5_Impl: IFabricKeyValueStoreReplica4_Impl {
fn TryAdd(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
) -> windows_core::Result<bool>;
fn TryRemove(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<bool>;
fn TryUpdate(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<bool>;
fn TryGet(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemResult>;
fn TryGetMetadata(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
key: &windows_core::PCWSTR,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataResult>;
fn EnumerateByKey2(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
keyprefix: &windows_core::PCWSTR,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateMetadataByKey2(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
keyprefix: &windows_core::PCWSTR,
strictprefix: bool,
) -> windows_core::Result<IFabricKeyValueStoreItemMetadataEnumerator>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica5_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica5_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn TryAdd<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
added: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::TryAdd(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&valuesizeinbytes),
core::mem::transmute_copy(&value),
) {
Ok(ok__) => {
added.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn TryRemove<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
exists: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::TryRemove(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&checksequencenumber),
) {
Ok(ok__) => {
exists.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn TryUpdate<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
valuesizeinbytes: i32,
value: *const u8,
checksequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
exists: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::TryUpdate(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
core::mem::transmute_copy(&valuesizeinbytes),
core::mem::transmute_copy(&value),
core::mem::transmute_copy(&checksequencenumber),
) {
Ok(ok__) => {
exists.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn TryGet<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::TryGet(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn TryGetMetadata<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
key: windows_core::PCWSTR,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::TryGetMetadata(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&key),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateByKey2<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
strictprefix: bool,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::EnumerateByKey2(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&keyprefix),
core::mem::transmute_copy(&strictprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateMetadataByKey2<
Identity: IFabricKeyValueStoreReplica5_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
keyprefix: windows_core::PCWSTR,
strictprefix: bool,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica5_Impl::EnumerateMetadataByKey2(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute(&keyprefix),
core::mem::transmute_copy(&strictprefix),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreReplica4_Vtbl::new::<Identity, OFFSET>(),
TryAdd: TryAdd::<Identity, OFFSET>,
TryRemove: TryRemove::<Identity, OFFSET>,
TryUpdate: TryUpdate::<Identity, OFFSET>,
TryGet: TryGet::<Identity, OFFSET>,
TryGetMetadata: TryGetMetadata::<Identity, OFFSET>,
EnumerateByKey2: EnumerateByKey2::<Identity, OFFSET>,
EnumerateMetadataByKey2: EnumerateMetadataByKey2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica5 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica4 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica5 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica6,
IFabricKeyValueStoreReplica6_Vtbl,
0x56e77be1_e81f_4e42_8522_162c2d608184
);
impl core::ops::Deref for IFabricKeyValueStoreReplica6 {
type Target = IFabricKeyValueStoreReplica5;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica6,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica3,
IFabricKeyValueStoreReplica4,
IFabricKeyValueStoreReplica5
);
impl IFabricKeyValueStoreReplica6 {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginRestore2<P0, P2>(
&self,
backupdirectory: P0,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_RESTORE_SETTINGS,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRestore2)(
windows_core::Interface::as_raw(self),
backupdirectory.param().abi(),
settings,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica6_Vtbl {
pub base__: IFabricKeyValueStoreReplica5_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginRestore2: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*const super::FabricTypes::FABRIC_KEY_VALUE_STORE_RESTORE_SETTINGS,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginRestore2: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica6 {}
unsafe impl Sync for IFabricKeyValueStoreReplica6 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica6_Impl: IFabricKeyValueStoreReplica5_Impl {
fn BeginRestore2(
&self,
backupdirectory: &windows_core::PCWSTR,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_RESTORE_SETTINGS,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica6_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica6_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginRestore2<
Identity: IFabricKeyValueStoreReplica6_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
backupdirectory: windows_core::PCWSTR,
settings: *const super::FabricTypes::FABRIC_KEY_VALUE_STORE_RESTORE_SETTINGS,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica6_Impl::BeginRestore2(
this,
core::mem::transmute(&backupdirectory),
core::mem::transmute_copy(&settings),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreReplica5_Vtbl::new::<Identity, OFFSET>(),
BeginRestore2: BeginRestore2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica6 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica4 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica5 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica6 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica7,
IFabricKeyValueStoreReplica7_Vtbl,
0x2903f8b3_f508_4ee8_b205_289d877f63ce
);
impl core::ops::Deref for IFabricKeyValueStoreReplica7 {
type Target = IFabricKeyValueStoreReplica6;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica7,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica3,
IFabricKeyValueStoreReplica4,
IFabricKeyValueStoreReplica5,
IFabricKeyValueStoreReplica6
);
impl IFabricKeyValueStoreReplica7 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn EnumerateByLSN<P0>(
&self,
transaction: P0,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateByLSN)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
fromlsn,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn EnumerateKeysAndTombstonesByLSN<P0>(
&self,
transaction: P0,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>
where
P0: windows_core::Param<IFabricTransactionBase>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EnumerateKeysAndTombstonesByLSN)(
windows_core::Interface::as_raw(self),
transaction.param().abi(),
fromlsn,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetLastCommittedSequenceNumber(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLastCommittedSequenceNumber)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica7_Vtbl {
pub base__: IFabricKeyValueStoreReplica6_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub EnumerateByLSN: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
EnumerateByLSN: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub EnumerateKeysAndTombstonesByLSN: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
EnumerateKeysAndTombstonesByLSN: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetLastCommittedSequenceNumber: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetLastCommittedSequenceNumber: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica7 {}
unsafe impl Sync for IFabricKeyValueStoreReplica7 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica7_Impl: IFabricKeyValueStoreReplica6_Impl {
fn EnumerateByLSN(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn EnumerateKeysAndTombstonesByLSN(
&self,
transaction: windows_core::Ref<IFabricTransactionBase>,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<IFabricKeyValueStoreItemEnumerator>;
fn GetLastCommittedSequenceNumber(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica7_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica7_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn EnumerateByLSN<
Identity: IFabricKeyValueStoreReplica7_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica7_Impl::EnumerateByLSN(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute_copy(&fromlsn),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EnumerateKeysAndTombstonesByLSN<
Identity: IFabricKeyValueStoreReplica7_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
transaction: *mut core::ffi::c_void,
fromlsn: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
result: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica7_Impl::EnumerateKeysAndTombstonesByLSN(
this,
core::mem::transmute_copy(&transaction),
core::mem::transmute_copy(&fromlsn),
) {
Ok(ok__) => {
result.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetLastCommittedSequenceNumber<
Identity: IFabricKeyValueStoreReplica7_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
lastcommittedsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica7_Impl::GetLastCommittedSequenceNumber(this) {
Ok(ok__) => {
lastcommittedsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreReplica6_Vtbl::new::<Identity, OFFSET>(),
EnumerateByLSN: EnumerateByLSN::<Identity, OFFSET>,
EnumerateKeysAndTombstonesByLSN: EnumerateKeysAndTombstonesByLSN::<Identity, OFFSET>,
GetLastCommittedSequenceNumber: GetLastCommittedSequenceNumber::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica7 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica4 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica5 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica6 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica7 {}
windows_core::imp::define_interface!(
IFabricKeyValueStoreReplica8,
IFabricKeyValueStoreReplica8_Vtbl,
0xfb87ec27_fff9_4c03_820e_41a7ef38e732
);
impl core::ops::Deref for IFabricKeyValueStoreReplica8 {
type Target = IFabricKeyValueStoreReplica7;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricKeyValueStoreReplica8,
windows_core::IUnknown,
IFabricStatefulServiceReplica,
IFabricKeyValueStoreReplica,
IFabricKeyValueStoreReplica2,
IFabricKeyValueStoreReplica3,
IFabricKeyValueStoreReplica4,
IFabricKeyValueStoreReplica5,
IFabricKeyValueStoreReplica6,
IFabricKeyValueStoreReplica7
);
impl IFabricKeyValueStoreReplica8 {
pub unsafe fn TryAbortExistingTransactionsAndRejectWrites(&self) -> windows_core::Result<bool> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).TryAbortExistingTransactionsAndRejectWrites)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetLSNSplitPercentile(
&self,
percentile: i32,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLSNSplitPercentile)(
windows_core::Interface::as_raw(self),
percentile,
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricKeyValueStoreReplica8_Vtbl {
pub base__: IFabricKeyValueStoreReplica7_Vtbl,
pub TryAbortExistingTransactionsAndRejectWrites:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetLSNSplitPercentile: unsafe extern "system" fn(
*mut core::ffi::c_void,
i32,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetLSNSplitPercentile: usize,
}
unsafe impl Send for IFabricKeyValueStoreReplica8 {}
unsafe impl Sync for IFabricKeyValueStoreReplica8 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricKeyValueStoreReplica8_Impl: IFabricKeyValueStoreReplica7_Impl {
fn TryAbortExistingTransactionsAndRejectWrites(&self) -> windows_core::Result<bool>;
fn GetLSNSplitPercentile(
&self,
percentile: i32,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricKeyValueStoreReplica8_Vtbl {
pub const fn new<Identity: IFabricKeyValueStoreReplica8_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn TryAbortExistingTransactionsAndRejectWrites<
Identity: IFabricKeyValueStoreReplica8_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
readyforfinalmigration: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica8_Impl::TryAbortExistingTransactionsAndRejectWrites(
this,
) {
Ok(ok__) => {
readyforfinalmigration.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetLSNSplitPercentile<
Identity: IFabricKeyValueStoreReplica8_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
percentile: i32,
readyforfinalmigration: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricKeyValueStoreReplica8_Impl::GetLSNSplitPercentile(
this,
core::mem::transmute_copy(&percentile),
) {
Ok(ok__) => {
readyforfinalmigration.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricKeyValueStoreReplica7_Vtbl::new::<Identity, OFFSET>(),
TryAbortExistingTransactionsAndRejectWrites:
TryAbortExistingTransactionsAndRejectWrites::<Identity, OFFSET>,
GetLSNSplitPercentile: GetLSNSplitPercentile::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricKeyValueStoreReplica8 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica2 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica3 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica4 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica5 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica6 as windows_core::Interface>::IID
|| iid == &<IFabricKeyValueStoreReplica7 as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricKeyValueStoreReplica8 {}
windows_core::imp::define_interface!(
IFabricNodeContextResult,
IFabricNodeContextResult_Vtbl,
0x0952f885_6f5a_4ed3_abe4_90c403d1e3ce
);
windows_core::imp::interface_hierarchy!(IFabricNodeContextResult, windows_core::IUnknown);
impl IFabricNodeContextResult {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_NodeContext(&self) -> *const super::FabricTypes::FABRIC_NODE_CONTEXT {
unsafe {
(windows_core::Interface::vtable(self).get_NodeContext)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricNodeContextResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_NodeContext:
unsafe extern "system" fn(
*mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_NODE_CONTEXT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_NodeContext: usize,
}
unsafe impl Send for IFabricNodeContextResult {}
unsafe impl Sync for IFabricNodeContextResult {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricNodeContextResult_Impl: windows_core::IUnknownImpl {
fn get_NodeContext(&self) -> *const super::FabricTypes::FABRIC_NODE_CONTEXT;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricNodeContextResult_Vtbl {
pub const fn new<Identity: IFabricNodeContextResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_NodeContext<
Identity: IFabricNodeContextResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_NODE_CONTEXT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricNodeContextResult_Impl::get_NodeContext(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_NodeContext: get_NodeContext::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricNodeContextResult as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricNodeContextResult {}
windows_core::imp::define_interface!(
IFabricNodeContextResult2,
IFabricNodeContextResult2_Vtbl,
0x472bf2e1_d617_4b5c_a91d_fabed9ff3550
);
impl core::ops::Deref for IFabricNodeContextResult2 {
type Target = IFabricNodeContextResult;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricNodeContextResult2,
windows_core::IUnknown,
IFabricNodeContextResult
);
impl IFabricNodeContextResult2 {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn GetDirectory<P0>(
&self,
logicaldirectoryname: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetDirectory)(
windows_core::Interface::as_raw(self),
logicaldirectoryname.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricNodeContextResult2_Vtbl {
pub base__: IFabricNodeContextResult_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub GetDirectory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
GetDirectory: usize,
}
unsafe impl Send for IFabricNodeContextResult2 {}
unsafe impl Sync for IFabricNodeContextResult2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricNodeContextResult2_Impl: IFabricNodeContextResult_Impl {
fn GetDirectory(
&self,
logicaldirectoryname: &windows_core::PCWSTR,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricNodeContextResult2_Vtbl {
pub const fn new<Identity: IFabricNodeContextResult2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetDirectory<
Identity: IFabricNodeContextResult2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
logicaldirectoryname: windows_core::PCWSTR,
directorypath: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricNodeContextResult2_Impl::GetDirectory(
this,
core::mem::transmute(&logicaldirectoryname),
) {
Ok(ok__) => {
directorypath.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricNodeContextResult_Vtbl::new::<Identity, OFFSET>(),
GetDirectory: GetDirectory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricNodeContextResult2 as windows_core::Interface>::IID
|| iid == &<IFabricNodeContextResult as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricNodeContextResult2 {}
windows_core::imp::define_interface!(
IFabricOperation,
IFabricOperation_Vtbl,
0xf4ad6bfa_e23c_4a48_9617_c099cd59a23a
);
windows_core::imp::interface_hierarchy!(IFabricOperation, windows_core::IUnknown);
impl IFabricOperation {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Metadata(&self) -> *const super::FabricTypes::FABRIC_OPERATION_METADATA {
unsafe {
(windows_core::Interface::vtable(self).get_Metadata)(windows_core::Interface::as_raw(
self,
))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetData(
&self,
count: *mut u32,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetData)(
windows_core::Interface::as_raw(self),
count as _,
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn Acknowledge(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).Acknowledge)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricOperation_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_Metadata:
unsafe extern "system" fn(
*mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_OPERATION_METADATA,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_Metadata: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetData: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut u32,
*mut *mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetData: usize,
pub Acknowledge: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricOperation {}
unsafe impl Sync for IFabricOperation {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricOperation_Impl: windows_core::IUnknownImpl {
fn get_Metadata(&self) -> *const super::FabricTypes::FABRIC_OPERATION_METADATA;
fn GetData(
&self,
count: *mut u32,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER>;
fn Acknowledge(&self) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricOperation_Vtbl {
pub const fn new<Identity: IFabricOperation_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Metadata<
Identity: IFabricOperation_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_OPERATION_METADATA {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricOperation_Impl::get_Metadata(this)
}
}
unsafe extern "system" fn GetData<Identity: IFabricOperation_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
count: *mut u32,
buffers: *mut *mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperation_Impl::GetData(this, core::mem::transmute_copy(&count)) {
Ok(ok__) => {
buffers.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Acknowledge<
Identity: IFabricOperation_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricOperation_Impl::Acknowledge(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Metadata: get_Metadata::<Identity, OFFSET>,
GetData: GetData::<Identity, OFFSET>,
Acknowledge: Acknowledge::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricOperation as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricOperation {}
windows_core::imp::define_interface!(
IFabricOperationData,
IFabricOperationData_Vtbl,
0xbab8ad87_37b7_482a_985d_baf38a785dcd
);
windows_core::imp::interface_hierarchy!(IFabricOperationData, windows_core::IUnknown);
impl IFabricOperationData {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetData(
&self,
count: *mut u32,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetData)(
windows_core::Interface::as_raw(self),
count as _,
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricOperationData_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetData: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut u32,
*mut *mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetData: usize,
}
unsafe impl Send for IFabricOperationData {}
unsafe impl Sync for IFabricOperationData {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricOperationData_Impl: windows_core::IUnknownImpl {
fn GetData(
&self,
count: *mut u32,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricOperationData_Vtbl {
pub const fn new<Identity: IFabricOperationData_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetData<
Identity: IFabricOperationData_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
count: *mut u32,
buffers: *mut *mut super::FabricTypes::FABRIC_OPERATION_DATA_BUFFER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperationData_Impl::GetData(this, core::mem::transmute_copy(&count)) {
Ok(ok__) => {
buffers.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetData: GetData::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricOperationData as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricOperationData {}
windows_core::imp::define_interface!(
IFabricOperationDataStream,
IFabricOperationDataStream_Vtbl,
0xc4e9084c_be92_49c9_8c18_d44d088c2e32
);
windows_core::imp::interface_hierarchy!(IFabricOperationDataStream, windows_core::IUnknown);
impl IFabricOperationDataStream {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginGetNext<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginGetNext)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndGetNext<P0>(&self, context: P0) -> windows_core::Result<IFabricOperationData>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetNext)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricOperationDataStream_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginGetNext: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginGetNext: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndGetNext: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndGetNext: usize,
}
unsafe impl Send for IFabricOperationDataStream {}
unsafe impl Sync for IFabricOperationDataStream {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricOperationDataStream_Impl: windows_core::IUnknownImpl {
fn BeginGetNext(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndGetNext(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<IFabricOperationData>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricOperationDataStream_Vtbl {
pub const fn new<Identity: IFabricOperationDataStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginGetNext<
Identity: IFabricOperationDataStream_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperationDataStream_Impl::BeginGetNext(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndGetNext<
Identity: IFabricOperationDataStream_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
operationdata: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperationDataStream_Impl::EndGetNext(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
operationdata.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginGetNext: BeginGetNext::<Identity, OFFSET>,
EndGetNext: EndGetNext::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricOperationDataStream as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricOperationDataStream {}
windows_core::imp::define_interface!(
IFabricOperationStream,
IFabricOperationStream_Vtbl,
0xa98fb97a_d6b0_408a_a878_a9edb09c2587
);
windows_core::imp::interface_hierarchy!(IFabricOperationStream, windows_core::IUnknown);
impl IFabricOperationStream {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginGetOperation<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginGetOperation)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndGetOperation<P0>(&self, context: P0) -> windows_core::Result<IFabricOperation>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndGetOperation)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricOperationStream_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginGetOperation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginGetOperation: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndGetOperation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndGetOperation: usize,
}
unsafe impl Send for IFabricOperationStream {}
unsafe impl Sync for IFabricOperationStream {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricOperationStream_Impl: windows_core::IUnknownImpl {
fn BeginGetOperation(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndGetOperation(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<IFabricOperation>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricOperationStream_Vtbl {
pub const fn new<Identity: IFabricOperationStream_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginGetOperation<
Identity: IFabricOperationStream_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperationStream_Impl::BeginGetOperation(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndGetOperation<
Identity: IFabricOperationStream_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
operation: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricOperationStream_Impl::EndGetOperation(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
operation.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginGetOperation: BeginGetOperation::<Identity, OFFSET>,
EndGetOperation: EndGetOperation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricOperationStream as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricOperationStream {}
windows_core::imp::define_interface!(
IFabricOperationStream2,
IFabricOperationStream2_Vtbl,
0x0930199b_590a_4065_bec9_5f93b6aae086
);
impl core::ops::Deref for IFabricOperationStream2 {
type Target = IFabricOperationStream;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricOperationStream2,
windows_core::IUnknown,
IFabricOperationStream
);
impl IFabricOperationStream2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportFault)(
windows_core::Interface::as_raw(self),
faulttype,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricOperationStream2_Vtbl {
pub base__: IFabricOperationStream_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportFault: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportFault: usize,
}
unsafe impl Send for IFabricOperationStream2 {}
unsafe impl Sync for IFabricOperationStream2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricOperationStream2_Impl: IFabricOperationStream_Impl {
fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricOperationStream2_Vtbl {
pub const fn new<Identity: IFabricOperationStream2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ReportFault<
Identity: IFabricOperationStream2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricOperationStream2_Impl::ReportFault(
this,
core::mem::transmute_copy(&faulttype),
)
.into()
}
}
Self {
base__: IFabricOperationStream_Vtbl::new::<Identity, OFFSET>(),
ReportFault: ReportFault::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricOperationStream2 as windows_core::Interface>::IID
|| iid == &<IFabricOperationStream as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricOperationStream2 {}
windows_core::imp::define_interface!(
IFabricPrimaryReplicator,
IFabricPrimaryReplicator_Vtbl,
0x564e50dd_c3a4_4600_a60e_6658874307ae
);
impl core::ops::Deref for IFabricPrimaryReplicator {
type Target = IFabricReplicator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricPrimaryReplicator,
windows_core::IUnknown,
IFabricReplicator
);
impl IFabricPrimaryReplicator {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOnDataLoss<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOnDataLoss)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOnDataLoss<P0>(&self, context: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOnDataLoss)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn UpdateCatchUpReplicaSetConfiguration(
&self,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
previousconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UpdateCatchUpReplicaSetConfiguration)(
windows_core::Interface::as_raw(self),
currentconfiguration,
previousconfiguration,
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginWaitForCatchUpQuorum<P1>(
&self,
catchupmode: super::FabricTypes::FABRIC_REPLICA_SET_QUORUM_MODE,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginWaitForCatchUpQuorum)(
windows_core::Interface::as_raw(self),
catchupmode,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndWaitForCatchUpQuorum<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndWaitForCatchUpQuorum)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn UpdateCurrentReplicaSetConfiguration(
&self,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UpdateCurrentReplicaSetConfiguration)(
windows_core::Interface::as_raw(self),
currentconfiguration,
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginBuildReplica<P1>(
&self,
replica: *const super::FabricTypes::FABRIC_REPLICA_INFORMATION,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginBuildReplica)(
windows_core::Interface::as_raw(self),
replica,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndBuildReplica<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndBuildReplica)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn RemoveReplica(
&self,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).RemoveReplica)(
windows_core::Interface::as_raw(self),
replicaid,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricPrimaryReplicator_Vtbl {
pub base__: IFabricReplicator_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOnDataLoss: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOnDataLoss: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub UpdateCatchUpReplicaSetConfiguration: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
*const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
)
-> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
UpdateCatchUpReplicaSetConfiguration: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginWaitForCatchUpQuorum: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_REPLICA_SET_QUORUM_MODE,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginWaitForCatchUpQuorum: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndWaitForCatchUpQuorum: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndWaitForCatchUpQuorum: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub UpdateCurrentReplicaSetConfiguration: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
)
-> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
UpdateCurrentReplicaSetConfiguration: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginBuildReplica: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICA_INFORMATION,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginBuildReplica: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndBuildReplica: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndBuildReplica: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub RemoveReplica: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
RemoveReplica: usize,
}
unsafe impl Send for IFabricPrimaryReplicator {}
unsafe impl Sync for IFabricPrimaryReplicator {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricPrimaryReplicator_Impl: IFabricReplicator_Impl {
fn BeginOnDataLoss(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOnDataLoss(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<bool>;
fn UpdateCatchUpReplicaSetConfiguration(
&self,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
previousconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::Result<()>;
fn BeginWaitForCatchUpQuorum(
&self,
catchupmode: super::FabricTypes::FABRIC_REPLICA_SET_QUORUM_MODE,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndWaitForCatchUpQuorum(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn UpdateCurrentReplicaSetConfiguration(
&self,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::Result<()>;
fn BeginBuildReplica(
&self,
replica: *const super::FabricTypes::FABRIC_REPLICA_INFORMATION,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndBuildReplica(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn RemoveReplica(
&self,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricPrimaryReplicator_Vtbl {
pub const fn new<Identity: IFabricPrimaryReplicator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginOnDataLoss<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricPrimaryReplicator_Impl::BeginOnDataLoss(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOnDataLoss<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
isstatechanged: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricPrimaryReplicator_Impl::EndOnDataLoss(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
isstatechanged.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UpdateCatchUpReplicaSetConfiguration<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
previousconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricPrimaryReplicator_Impl::UpdateCatchUpReplicaSetConfiguration(
this,
core::mem::transmute_copy(¤tconfiguration),
core::mem::transmute_copy(&previousconfiguration),
)
.into()
}
}
unsafe extern "system" fn BeginWaitForCatchUpQuorum<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
catchupmode: super::FabricTypes::FABRIC_REPLICA_SET_QUORUM_MODE,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricPrimaryReplicator_Impl::BeginWaitForCatchUpQuorum(
this,
core::mem::transmute_copy(&catchupmode),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndWaitForCatchUpQuorum<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricPrimaryReplicator_Impl::EndWaitForCatchUpQuorum(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn UpdateCurrentReplicaSetConfiguration<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
currentconfiguration: *const super::FabricTypes::FABRIC_REPLICA_SET_CONFIGURATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricPrimaryReplicator_Impl::UpdateCurrentReplicaSetConfiguration(
this,
core::mem::transmute_copy(¤tconfiguration),
)
.into()
}
}
unsafe extern "system" fn BeginBuildReplica<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
replica: *const super::FabricTypes::FABRIC_REPLICA_INFORMATION,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricPrimaryReplicator_Impl::BeginBuildReplica(
this,
core::mem::transmute_copy(&replica),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndBuildReplica<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricPrimaryReplicator_Impl::EndBuildReplica(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn RemoveReplica<
Identity: IFabricPrimaryReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricPrimaryReplicator_Impl::RemoveReplica(
this,
core::mem::transmute_copy(&replicaid),
)
.into()
}
}
Self {
base__: IFabricReplicator_Vtbl::new::<Identity, OFFSET>(),
BeginOnDataLoss: BeginOnDataLoss::<Identity, OFFSET>,
EndOnDataLoss: EndOnDataLoss::<Identity, OFFSET>,
UpdateCatchUpReplicaSetConfiguration: UpdateCatchUpReplicaSetConfiguration::<
Identity,
OFFSET,
>,
BeginWaitForCatchUpQuorum: BeginWaitForCatchUpQuorum::<Identity, OFFSET>,
EndWaitForCatchUpQuorum: EndWaitForCatchUpQuorum::<Identity, OFFSET>,
UpdateCurrentReplicaSetConfiguration: UpdateCurrentReplicaSetConfiguration::<
Identity,
OFFSET,
>,
BeginBuildReplica: BeginBuildReplica::<Identity, OFFSET>,
EndBuildReplica: EndBuildReplica::<Identity, OFFSET>,
RemoveReplica: RemoveReplica::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricPrimaryReplicator as windows_core::Interface>::IID
|| iid == &<IFabricReplicator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricPrimaryReplicator {}
windows_core::imp::define_interface!(
IFabricProcessExitHandler,
IFabricProcessExitHandler_Vtbl,
0xc58d50a2_01f0_4267_bbe7_223b565c1346
);
windows_core::imp::interface_hierarchy!(IFabricProcessExitHandler, windows_core::IUnknown);
impl IFabricProcessExitHandler {
pub unsafe fn FabricProcessExited(&self) {
unsafe {
(windows_core::Interface::vtable(self).FabricProcessExited)(
windows_core::Interface::as_raw(self),
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricProcessExitHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub FabricProcessExited: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricProcessExitHandler {}
unsafe impl Sync for IFabricProcessExitHandler {}
pub trait IFabricProcessExitHandler_Impl: windows_core::IUnknownImpl {
fn FabricProcessExited(&self);
}
impl IFabricProcessExitHandler_Vtbl {
pub const fn new<Identity: IFabricProcessExitHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn FabricProcessExited<
Identity: IFabricProcessExitHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricProcessExitHandler_Impl::FabricProcessExited(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
FabricProcessExited: FabricProcessExited::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricProcessExitHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricProcessExitHandler {}
windows_core::imp::define_interface!(
IFabricReplicator,
IFabricReplicator_Vtbl,
0x067f144a_e5be_4f5e_a181_8b5593e20242
);
windows_core::imp::interface_hierarchy!(IFabricReplicator, windows_core::IUnknown);
impl IFabricReplicator {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOpen<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOpen)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOpen<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOpen)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginChangeRole<P2>(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
role: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginChangeRole)(
windows_core::Interface::as_raw(self),
epoch,
role,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndChangeRole<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndChangeRole)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginUpdateEpoch<P1>(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginUpdateEpoch)(
windows_core::Interface::as_raw(self),
epoch,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndUpdateEpoch<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndUpdateEpoch)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginClose<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginClose)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndClose<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndClose)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn Abort(&self) {
unsafe {
(windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self));
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetCurrentProgress(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCurrentProgress)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetCatchUpCapability(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCatchUpCapability)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricReplicator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOpen: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginChangeRole: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_EPOCH,
super::FabricTypes::FABRIC_REPLICA_ROLE,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginChangeRole: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndChangeRole: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndChangeRole: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginUpdateEpoch: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_EPOCH,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginUpdateEpoch: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndUpdateEpoch: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndUpdateEpoch: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginClose: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndClose: usize,
pub Abort: unsafe extern "system" fn(*mut core::ffi::c_void),
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetCurrentProgress: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetCurrentProgress: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetCatchUpCapability: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetCatchUpCapability: usize,
}
unsafe impl Send for IFabricReplicator {}
unsafe impl Sync for IFabricReplicator {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricReplicator_Impl: windows_core::IUnknownImpl {
fn BeginOpen(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOpen(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
fn BeginChangeRole(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
role: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndChangeRole(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginUpdateEpoch(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndUpdateEpoch(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn BeginClose(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndClose(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn Abort(&self);
fn GetCurrentProgress(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn GetCatchUpCapability(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricReplicator_Vtbl {
pub const fn new<Identity: IFabricReplicator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginOpen<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::BeginOpen(this, core::mem::transmute_copy(&callback))
{
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOpen<Identity: IFabricReplicator_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
replicationaddress: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::EndOpen(this, core::mem::transmute_copy(&context)) {
Ok(ok__) => {
replicationaddress.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginChangeRole<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
role: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::BeginChangeRole(
this,
core::mem::transmute_copy(&epoch),
core::mem::transmute_copy(&role),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndChangeRole<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricReplicator_Impl::EndChangeRole(this, core::mem::transmute_copy(&context))
.into()
}
}
unsafe extern "system" fn BeginUpdateEpoch<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::BeginUpdateEpoch(
this,
core::mem::transmute_copy(&epoch),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndUpdateEpoch<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricReplicator_Impl::EndUpdateEpoch(this, core::mem::transmute_copy(&context))
.into()
}
}
unsafe extern "system" fn BeginClose<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::BeginClose(this, core::mem::transmute_copy(&callback))
{
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndClose<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricReplicator_Impl::EndClose(this, core::mem::transmute_copy(&context)).into()
}
}
unsafe extern "system" fn Abort<Identity: IFabricReplicator_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricReplicator_Impl::Abort(this);
}
}
unsafe extern "system" fn GetCurrentProgress<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
lastsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::GetCurrentProgress(this) {
Ok(ok__) => {
lastsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCatchUpCapability<
Identity: IFabricReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
fromsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricReplicator_Impl::GetCatchUpCapability(this) {
Ok(ok__) => {
fromsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginOpen: BeginOpen::<Identity, OFFSET>,
EndOpen: EndOpen::<Identity, OFFSET>,
BeginChangeRole: BeginChangeRole::<Identity, OFFSET>,
EndChangeRole: EndChangeRole::<Identity, OFFSET>,
BeginUpdateEpoch: BeginUpdateEpoch::<Identity, OFFSET>,
EndUpdateEpoch: EndUpdateEpoch::<Identity, OFFSET>,
BeginClose: BeginClose::<Identity, OFFSET>,
EndClose: EndClose::<Identity, OFFSET>,
Abort: Abort::<Identity, OFFSET>,
GetCurrentProgress: GetCurrentProgress::<Identity, OFFSET>,
GetCatchUpCapability: GetCatchUpCapability::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricReplicator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricReplicator {}
windows_core::imp::define_interface!(
IFabricReplicatorCatchupSpecificQuorum,
IFabricReplicatorCatchupSpecificQuorum_Vtbl,
0xaa3116fe_277d_482d_bd16_5366fa405757
);
windows_core::imp::interface_hierarchy!(
IFabricReplicatorCatchupSpecificQuorum,
windows_core::IUnknown
);
#[repr(C)]
#[doc(hidden)]
pub struct IFabricReplicatorCatchupSpecificQuorum_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
}
unsafe impl Send for IFabricReplicatorCatchupSpecificQuorum {}
unsafe impl Sync for IFabricReplicatorCatchupSpecificQuorum {}
pub trait IFabricReplicatorCatchupSpecificQuorum_Impl: windows_core::IUnknownImpl {}
impl IFabricReplicatorCatchupSpecificQuorum_Vtbl {
pub const fn new<Identity: IFabricReplicatorCatchupSpecificQuorum_Impl, const OFFSET: isize>()
-> Self {
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricReplicatorCatchupSpecificQuorum as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricReplicatorCatchupSpecificQuorum {}
windows_core::imp::define_interface!(
IFabricReplicatorSettingsResult,
IFabricReplicatorSettingsResult_Vtbl,
0x718954f3_dc1e_4060_9806_0cbf36f71051
);
windows_core::imp::interface_hierarchy!(IFabricReplicatorSettingsResult, windows_core::IUnknown);
impl IFabricReplicatorSettingsResult {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ReplicatorSettings(
&self,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS {
unsafe {
(windows_core::Interface::vtable(self).get_ReplicatorSettings)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricReplicatorSettingsResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_ReplicatorSettings:
unsafe extern "system" fn(
*mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_ReplicatorSettings: usize,
}
unsafe impl Send for IFabricReplicatorSettingsResult {}
unsafe impl Sync for IFabricReplicatorSettingsResult {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricReplicatorSettingsResult_Impl: windows_core::IUnknownImpl {
fn get_ReplicatorSettings(&self) -> *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricReplicatorSettingsResult_Vtbl {
pub const fn new<Identity: IFabricReplicatorSettingsResult_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn get_ReplicatorSettings<
Identity: IFabricReplicatorSettingsResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricReplicatorSettingsResult_Impl::get_ReplicatorSettings(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_ReplicatorSettings: get_ReplicatorSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricReplicatorSettingsResult as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricReplicatorSettingsResult {}
windows_core::imp::define_interface!(
IFabricRuntime,
IFabricRuntime_Vtbl,
0xcc53af8e_74cd_11df_ac3e_0024811e3892
);
windows_core::imp::interface_hierarchy!(IFabricRuntime, windows_core::IUnknown);
impl IFabricRuntime {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginRegisterStatelessServiceFactory<P0, P1, P3>(
&self,
servicetypename: P0,
factory: P1,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatelessServiceFactory>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRegisterStatelessServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndRegisterStatelessServiceFactory<P0>(
&self,
context: P0,
) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndRegisterStatelessServiceFactory)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn RegisterStatelessServiceFactory<P0, P1>(
&self,
servicetypename: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatelessServiceFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).RegisterStatelessServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginRegisterStatefulServiceFactory<P0, P1, P3>(
&self,
servicetypename: P0,
factory: P1,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatefulServiceFactory>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRegisterStatefulServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndRegisterStatefulServiceFactory<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndRegisterStatefulServiceFactory)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn RegisterStatefulServiceFactory<P0, P1>(
&self,
servicetypename: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatefulServiceFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).RegisterStatefulServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
)
}
}
pub unsafe fn CreateServiceGroupFactoryBuilder(
&self,
) -> windows_core::Result<IFabricServiceGroupFactoryBuilder> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateServiceGroupFactoryBuilder)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginRegisterServiceGroupFactory<P0, P1, P3>(
&self,
groupservicetype: P0,
factory: P1,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricServiceGroupFactory>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRegisterServiceGroupFactory)(
windows_core::Interface::as_raw(self),
groupservicetype.param().abi(),
factory.param().abi(),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndRegisterServiceGroupFactory<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndRegisterServiceGroupFactory)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn RegisterServiceGroupFactory<P0, P1>(
&self,
groupservicetype: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricServiceGroupFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).RegisterServiceGroupFactory)(
windows_core::Interface::as_raw(self),
groupservicetype.param().abi(),
factory.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricRuntime_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginRegisterStatelessServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
)
-> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginRegisterStatelessServiceFactory: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndRegisterStatelessServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndRegisterStatelessServiceFactory: usize,
pub RegisterStatelessServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginRegisterStatefulServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
)
-> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginRegisterStatefulServiceFactory: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndRegisterStatefulServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndRegisterStatefulServiceFactory: usize,
pub RegisterStatefulServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub CreateServiceGroupFactoryBuilder: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginRegisterServiceGroupFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginRegisterServiceGroupFactory: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndRegisterServiceGroupFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndRegisterServiceGroupFactory: usize,
pub RegisterServiceGroupFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricRuntime {}
unsafe impl Sync for IFabricRuntime {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricRuntime_Impl: windows_core::IUnknownImpl {
fn BeginRegisterStatelessServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatelessServiceFactory>,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndRegisterStatelessServiceFactory(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn RegisterStatelessServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatelessServiceFactory>,
) -> windows_core::Result<()>;
fn BeginRegisterStatefulServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatefulServiceFactory>,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndRegisterStatefulServiceFactory(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn RegisterStatefulServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatefulServiceFactory>,
) -> windows_core::Result<()>;
fn CreateServiceGroupFactoryBuilder(
&self,
) -> windows_core::Result<IFabricServiceGroupFactoryBuilder>;
fn BeginRegisterServiceGroupFactory(
&self,
groupservicetype: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricServiceGroupFactory>,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndRegisterServiceGroupFactory(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn RegisterServiceGroupFactory(
&self,
groupservicetype: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricServiceGroupFactory>,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricRuntime_Vtbl {
pub const fn new<Identity: IFabricRuntime_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginRegisterStatelessServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricRuntime_Impl::BeginRegisterStatelessServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndRegisterStatelessServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::EndRegisterStatelessServiceFactory(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn RegisterStatelessServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::RegisterStatelessServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
)
.into()
}
}
unsafe extern "system" fn BeginRegisterStatefulServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricRuntime_Impl::BeginRegisterStatefulServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndRegisterStatefulServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::EndRegisterStatefulServiceFactory(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn RegisterStatefulServiceFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::RegisterStatefulServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
)
.into()
}
}
unsafe extern "system" fn CreateServiceGroupFactoryBuilder<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
builder: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricRuntime_Impl::CreateServiceGroupFactoryBuilder(this) {
Ok(ok__) => {
builder.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginRegisterServiceGroupFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
groupservicetype: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricRuntime_Impl::BeginRegisterServiceGroupFactory(
this,
core::mem::transmute(&groupservicetype),
core::mem::transmute_copy(&factory),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndRegisterServiceGroupFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::EndRegisterServiceGroupFactory(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn RegisterServiceGroupFactory<
Identity: IFabricRuntime_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
groupservicetype: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime_Impl::RegisterServiceGroupFactory(
this,
core::mem::transmute(&groupservicetype),
core::mem::transmute_copy(&factory),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginRegisterStatelessServiceFactory: BeginRegisterStatelessServiceFactory::<
Identity,
OFFSET,
>,
EndRegisterStatelessServiceFactory: EndRegisterStatelessServiceFactory::<
Identity,
OFFSET,
>,
RegisterStatelessServiceFactory: RegisterStatelessServiceFactory::<Identity, OFFSET>,
BeginRegisterStatefulServiceFactory: BeginRegisterStatefulServiceFactory::<
Identity,
OFFSET,
>,
EndRegisterStatefulServiceFactory: EndRegisterStatefulServiceFactory::<Identity, OFFSET>,
RegisterStatefulServiceFactory: RegisterStatefulServiceFactory::<Identity, OFFSET>,
CreateServiceGroupFactoryBuilder: CreateServiceGroupFactoryBuilder::<Identity, OFFSET>,
BeginRegisterServiceGroupFactory: BeginRegisterServiceGroupFactory::<Identity, OFFSET>,
EndRegisterServiceGroupFactory: EndRegisterServiceGroupFactory::<Identity, OFFSET>,
RegisterServiceGroupFactory: RegisterServiceGroupFactory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricRuntime as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricRuntime {}
windows_core::imp::define_interface!(
IFabricRuntime2,
IFabricRuntime2_Vtbl,
0x2eb1046c_6fc9_494b_bd03_d9764be209fd
);
impl core::ops::Deref for IFabricRuntime2 {
type Target = IFabricRuntime;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(IFabricRuntime2, windows_core::IUnknown, IFabricRuntime);
impl IFabricRuntime2 {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginRegisterSelfReconfiguringServiceFactory<P0, P1, P3>(
&self,
servicetypename: P0,
factory: P1,
timeoutmilliseconds: u32,
callback: P3,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricSelfReconfiguringServiceFactory>,
P3: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginRegisterSelfReconfiguringServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndRegisterSelfReconfiguringServiceFactory<P0>(
&self,
context: P0,
) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndRegisterSelfReconfiguringServiceFactory)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn RegisterSelfReconfiguringServiceFactory<P0, P1>(
&self,
servicetypename: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricSelfReconfiguringServiceFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).RegisterSelfReconfiguringServiceFactory)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
factory.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricRuntime2_Vtbl {
pub base__: IFabricRuntime_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginRegisterSelfReconfiguringServiceFactory:
unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginRegisterSelfReconfiguringServiceFactory: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndRegisterSelfReconfiguringServiceFactory:
unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndRegisterSelfReconfiguringServiceFactory: usize,
pub RegisterSelfReconfiguringServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
)
-> windows_core::HRESULT,
}
unsafe impl Send for IFabricRuntime2 {}
unsafe impl Sync for IFabricRuntime2 {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricRuntime2_Impl: IFabricRuntime_Impl {
fn BeginRegisterSelfReconfiguringServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricSelfReconfiguringServiceFactory>,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndRegisterSelfReconfiguringServiceFactory(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn RegisterSelfReconfiguringServiceFactory(
&self,
servicetypename: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricSelfReconfiguringServiceFactory>,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricRuntime2_Vtbl {
pub const fn new<Identity: IFabricRuntime2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginRegisterSelfReconfiguringServiceFactory<
Identity: IFabricRuntime2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricRuntime2_Impl::BeginRegisterSelfReconfiguringServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndRegisterSelfReconfiguringServiceFactory<
Identity: IFabricRuntime2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime2_Impl::EndRegisterSelfReconfiguringServiceFactory(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn RegisterSelfReconfiguringServiceFactory<
Identity: IFabricRuntime2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricRuntime2_Impl::RegisterSelfReconfiguringServiceFactory(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute_copy(&factory),
)
.into()
}
}
Self {
base__: IFabricRuntime_Vtbl::new::<Identity, OFFSET>(),
BeginRegisterSelfReconfiguringServiceFactory:
BeginRegisterSelfReconfiguringServiceFactory::<Identity, OFFSET>,
EndRegisterSelfReconfiguringServiceFactory: EndRegisterSelfReconfiguringServiceFactory::<
Identity,
OFFSET,
>,
RegisterSelfReconfiguringServiceFactory: RegisterSelfReconfiguringServiceFactory::<
Identity,
OFFSET,
>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricRuntime2 as windows_core::Interface>::IID
|| iid == &<IFabricRuntime as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricRuntime2 {}
windows_core::imp::define_interface!(
IFabricSecondaryEventHandler,
IFabricSecondaryEventHandler_Vtbl,
0x7d124a7d_258e_49f2_a9b0_e800406103fb
);
windows_core::imp::interface_hierarchy!(IFabricSecondaryEventHandler, windows_core::IUnknown);
impl IFabricSecondaryEventHandler {
pub unsafe fn OnCopyComplete<P0>(&self, enumerator: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricKeyValueStoreEnumerator>,
{
unsafe {
(windows_core::Interface::vtable(self).OnCopyComplete)(
windows_core::Interface::as_raw(self),
enumerator.param().abi(),
)
}
}
pub unsafe fn OnReplicationOperation<P0>(&self, enumerator: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricKeyValueStoreNotificationEnumerator>,
{
unsafe {
(windows_core::Interface::vtable(self).OnReplicationOperation)(
windows_core::Interface::as_raw(self),
enumerator.param().abi(),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSecondaryEventHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnCopyComplete: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub OnReplicationOperation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricSecondaryEventHandler {}
unsafe impl Sync for IFabricSecondaryEventHandler {}
pub trait IFabricSecondaryEventHandler_Impl: windows_core::IUnknownImpl {
fn OnCopyComplete(
&self,
enumerator: windows_core::Ref<IFabricKeyValueStoreEnumerator>,
) -> windows_core::Result<()>;
fn OnReplicationOperation(
&self,
enumerator: windows_core::Ref<IFabricKeyValueStoreNotificationEnumerator>,
) -> windows_core::Result<()>;
}
impl IFabricSecondaryEventHandler_Vtbl {
pub const fn new<Identity: IFabricSecondaryEventHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnCopyComplete<
Identity: IFabricSecondaryEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
enumerator: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSecondaryEventHandler_Impl::OnCopyComplete(
this,
core::mem::transmute_copy(&enumerator),
)
.into()
}
}
unsafe extern "system" fn OnReplicationOperation<
Identity: IFabricSecondaryEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
enumerator: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSecondaryEventHandler_Impl::OnReplicationOperation(
this,
core::mem::transmute_copy(&enumerator),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnCopyComplete: OnCopyComplete::<Identity, OFFSET>,
OnReplicationOperation: OnReplicationOperation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSecondaryEventHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricSecondaryEventHandler {}
windows_core::imp::define_interface!(
IFabricSecurityCredentialsResult,
IFabricSecurityCredentialsResult_Vtbl,
0x049a111d_6a30_48e9_8f69_470760d3efb9
);
windows_core::imp::interface_hierarchy!(IFabricSecurityCredentialsResult, windows_core::IUnknown);
impl IFabricSecurityCredentialsResult {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_SecurityCredentials(
&self,
) -> *const super::FabricTypes::FABRIC_SECURITY_CREDENTIALS {
unsafe {
(windows_core::Interface::vtable(self).get_SecurityCredentials)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSecurityCredentialsResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_SecurityCredentials:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> *const super::FabricTypes::FABRIC_SECURITY_CREDENTIALS,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_SecurityCredentials: usize,
}
unsafe impl Send for IFabricSecurityCredentialsResult {}
unsafe impl Sync for IFabricSecurityCredentialsResult {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricSecurityCredentialsResult_Impl: windows_core::IUnknownImpl {
fn get_SecurityCredentials(&self) -> *const super::FabricTypes::FABRIC_SECURITY_CREDENTIALS;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricSecurityCredentialsResult_Vtbl {
pub const fn new<Identity: IFabricSecurityCredentialsResult_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn get_SecurityCredentials<
Identity: IFabricSecurityCredentialsResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_SECURITY_CREDENTIALS {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSecurityCredentialsResult_Impl::get_SecurityCredentials(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_SecurityCredentials: get_SecurityCredentials::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSecurityCredentialsResult as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricSecurityCredentialsResult {}
windows_core::imp::define_interface!(
IFabricSelfReconfiguringConfigurationChangeRequest,
IFabricSelfReconfiguringConfigurationChangeRequest_Vtbl,
0x90c010de_f86f_4aa1_87a3_915879c9901c
);
windows_core::imp::interface_hierarchy!(
IFabricSelfReconfiguringConfigurationChangeRequest,
windows_core::IUnknown
);
impl IFabricSelfReconfiguringConfigurationChangeRequest {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ConfigurationChangeRequest(
&self,
) -> *const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_CHANGE_REQUEST {
unsafe {
(windows_core::Interface::vtable(self).get_ConfigurationChangeRequest)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSelfReconfiguringConfigurationChangeRequest_Vtbl { pub base__ : windows_core::IUnknown_Vtbl , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ConfigurationChangeRequest : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_CHANGE_REQUEST , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ConfigurationChangeRequest : usize , }
unsafe impl Send for IFabricSelfReconfiguringConfigurationChangeRequest {}
unsafe impl Sync for IFabricSelfReconfiguringConfigurationChangeRequest {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricSelfReconfiguringConfigurationChangeRequest_Impl:
windows_core::IUnknownImpl
{
fn get_ConfigurationChangeRequest(
&self,
) -> *const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_CHANGE_REQUEST;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricSelfReconfiguringConfigurationChangeRequest_Vtbl {
pub const fn new<
Identity: IFabricSelfReconfiguringConfigurationChangeRequest_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn get_ConfigurationChangeRequest<
Identity: IFabricSelfReconfiguringConfigurationChangeRequest_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_CHANGE_REQUEST
{
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringConfigurationChangeRequest_Impl::get_ConfigurationChangeRequest (this ,)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_ConfigurationChangeRequest: get_ConfigurationChangeRequest::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSelfReconfiguringConfigurationChangeRequest as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricSelfReconfiguringConfigurationChangeRequest {}
windows_core::imp::define_interface!(
IFabricSelfReconfiguringServiceFactory,
IFabricSelfReconfiguringServiceFactory_Vtbl,
0x7edf5508_44c2_4f41_b594_1a8ba19882a5
);
windows_core::imp::interface_hierarchy!(
IFabricSelfReconfiguringServiceFactory,
windows_core::IUnknown
);
impl IFabricSelfReconfiguringServiceFactory {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateInstance<P0>(
&self,
servicetypename: P0,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
) -> windows_core::Result<IFabricSelfReconfiguringServiceInstance>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
servicename,
initializationdatalength,
initializationdata,
partitionid,
instanceid,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSelfReconfiguringServiceFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_URI,
u32,
*const u8,
super::FabricTypes::FABRIC_PARTITION_ID,
super::FabricTypes::FABRIC_INSTANCE_ID,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateInstance: usize,
}
unsafe impl Send for IFabricSelfReconfiguringServiceFactory {}
unsafe impl Sync for IFabricSelfReconfiguringServiceFactory {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricSelfReconfiguringServiceFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
servicetypename: &windows_core::PCWSTR,
servicename: &super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: &super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
) -> windows_core::Result<IFabricSelfReconfiguringServiceInstance>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricSelfReconfiguringServiceFactory_Vtbl {
pub const fn new<Identity: IFabricSelfReconfiguringServiceFactory_Impl, const OFFSET: isize>()
-> Self {
unsafe extern "system" fn CreateInstance<
Identity: IFabricSelfReconfiguringServiceFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
serviceinstance: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricSelfReconfiguringServiceFactory_Impl::CreateInstance(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute(&servicename),
core::mem::transmute_copy(&initializationdatalength),
core::mem::transmute_copy(&initializationdata),
core::mem::transmute(&partitionid),
core::mem::transmute_copy(&instanceid),
) {
Ok(ok__) => {
serviceinstance.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSelfReconfiguringServiceFactory as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricSelfReconfiguringServiceFactory {}
windows_core::imp::define_interface!(
IFabricSelfReconfiguringServiceInstance,
IFabricSelfReconfiguringServiceInstance_Vtbl,
0xd1dcb0dd_431a_4ae6_99ed_e241aa123a43
);
windows_core::imp::interface_hierarchy!(
IFabricSelfReconfiguringServiceInstance,
windows_core::IUnknown
);
impl IFabricSelfReconfiguringServiceInstance {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginOpen<P1, P2>(
&self,
openmode: super::FabricTypes::FABRIC_SELF_RECONFIGURING_INSTANCE_OPEN_MODE,
partition: P1,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<IFabricSelfReconfiguringServicePartition>,
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOpen)(
windows_core::Interface::as_raw(self),
openmode,
partition.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOpen<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOpen)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn RequestConfiguration(
&self,
configurationrequest : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REQUEST,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).RequestConfiguration)(
windows_core::Interface::as_raw(self),
configurationrequest,
)
}
}
pub unsafe fn RequestConfigurationChange<P0>(
&self,
configurationchangerequest: P0,
) -> windows_core::HRESULT
where
P0: windows_core::Param<IFabricSelfReconfiguringConfigurationChangeRequest>,
{
unsafe {
(windows_core::Interface::vtable(self).RequestConfigurationChange)(
windows_core::Interface::as_raw(self),
configurationchangerequest.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginClose<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginClose)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndClose<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndClose)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn Abort(&self) {
unsafe {
(windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSelfReconfiguringServiceInstance_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_SELF_RECONFIGURING_INSTANCE_OPEN_MODE,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOpen: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub RequestConfiguration: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REQUEST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
RequestConfiguration: usize,
pub RequestConfigurationChange: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginClose: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndClose: usize,
pub Abort: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricSelfReconfiguringServiceInstance {}
unsafe impl Sync for IFabricSelfReconfiguringServiceInstance {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricSelfReconfiguringServiceInstance_Impl: windows_core::IUnknownImpl {
fn BeginOpen(
&self,
openmode: super::FabricTypes::FABRIC_SELF_RECONFIGURING_INSTANCE_OPEN_MODE,
partition: windows_core::Ref<IFabricSelfReconfiguringServicePartition>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOpen(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
fn RequestConfiguration(
&self,
configurationrequest : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REQUEST,
) -> windows_core::Result<()>;
fn RequestConfigurationChange(
&self,
configurationchangerequest: windows_core::Ref<
IFabricSelfReconfiguringConfigurationChangeRequest,
>,
) -> windows_core::Result<()>;
fn BeginClose(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndClose(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn Abort(&self);
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricSelfReconfiguringServiceInstance_Vtbl {
pub const fn new<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn BeginOpen<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
openmode: super::FabricTypes::FABRIC_SELF_RECONFIGURING_INSTANCE_OPEN_MODE,
partition: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricSelfReconfiguringServiceInstance_Impl::BeginOpen(
this,
core::mem::transmute_copy(&openmode),
core::mem::transmute_copy(&partition),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOpen<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
serviceaddress: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricSelfReconfiguringServiceInstance_Impl::EndOpen(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
serviceaddress.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RequestConfiguration<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
configurationrequest : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REQUEST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServiceInstance_Impl::RequestConfiguration(
this,
core::mem::transmute_copy(&configurationrequest),
)
.into()
}
}
unsafe extern "system" fn RequestConfigurationChange<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
configurationchangerequest: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServiceInstance_Impl::RequestConfigurationChange(
this,
core::mem::transmute_copy(&configurationchangerequest),
)
.into()
}
}
unsafe extern "system" fn BeginClose<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricSelfReconfiguringServiceInstance_Impl::BeginClose(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndClose<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServiceInstance_Impl::EndClose(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn Abort<
Identity: IFabricSelfReconfiguringServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServiceInstance_Impl::Abort(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginOpen: BeginOpen::<Identity, OFFSET>,
EndOpen: EndOpen::<Identity, OFFSET>,
RequestConfiguration: RequestConfiguration::<Identity, OFFSET>,
RequestConfigurationChange: RequestConfigurationChange::<Identity, OFFSET>,
BeginClose: BeginClose::<Identity, OFFSET>,
EndClose: EndClose::<Identity, OFFSET>,
Abort: Abort::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSelfReconfiguringServiceInstance as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricSelfReconfiguringServiceInstance {}
windows_core::imp::define_interface!(
IFabricSelfReconfiguringServicePartition,
IFabricSelfReconfiguringServicePartition_Vtbl,
0x35e3b088_ce7d_4d89_b4b5_fafbe8d8aa3e
);
windows_core::imp::interface_hierarchy!(
IFabricSelfReconfiguringServicePartition,
windows_core::IUnknown
);
impl IFabricSelfReconfiguringServicePartition {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPartitionInfo)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportLoad)(
windows_core::Interface::as_raw(self),
metriccount,
metrics,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportFault)(
windows_core::Interface::as_raw(self),
faulttype,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportMoveCost)(
windows_core::Interface::as_raw(self),
movecost,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportInstanceHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportInstanceHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportPartitionHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportConfiguration(
&self,
configurationreport : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REPORT,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportConfiguration)(
windows_core::Interface::as_raw(self),
configurationreport,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricSelfReconfiguringServicePartition_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetPartitionInfo: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetPartitionInfo: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportLoad: unsafe extern "system" fn(
*mut core::ffi::c_void,
u32,
*const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportLoad: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportFault: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportFault: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportMoveCost: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportMoveCost: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportInstanceHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportInstanceHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportPartitionHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportPartitionHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportConfiguration: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REPORT,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportConfiguration: usize,
}
unsafe impl Send for IFabricSelfReconfiguringServicePartition {}
unsafe impl Sync for IFabricSelfReconfiguringServicePartition {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricSelfReconfiguringServicePartition_Impl: windows_core::IUnknownImpl {
fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION>;
fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::Result<()>;
fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::Result<()>;
fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::Result<()>;
fn ReportInstanceHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportConfiguration(
&self,
configurationreport : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REPORT,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricSelfReconfiguringServicePartition_Vtbl {
pub const fn new<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>() -> Self {
unsafe extern "system" fn GetPartitionInfo<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricSelfReconfiguringServicePartition_Impl::GetPartitionInfo(this) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ReportLoad<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportLoad(
this,
core::mem::transmute_copy(&metriccount),
core::mem::transmute_copy(&metrics),
)
.into()
}
}
unsafe extern "system" fn ReportFault<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportFault(
this,
core::mem::transmute_copy(&faulttype),
)
.into()
}
}
unsafe extern "system" fn ReportMoveCost<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportMoveCost(
this,
core::mem::transmute_copy(&movecost),
)
.into()
}
}
unsafe extern "system" fn ReportInstanceHealth<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportInstanceHealth(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportPartitionHealth<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportPartitionHealth(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportConfiguration<
Identity: IFabricSelfReconfiguringServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
configurationreport : * const super::FabricTypes::FABRIC_SELF_RECONFIGURING_CONFIGURATION_REPORT,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricSelfReconfiguringServicePartition_Impl::ReportConfiguration(
this,
core::mem::transmute_copy(&configurationreport),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetPartitionInfo: GetPartitionInfo::<Identity, OFFSET>,
ReportLoad: ReportLoad::<Identity, OFFSET>,
ReportFault: ReportFault::<Identity, OFFSET>,
ReportMoveCost: ReportMoveCost::<Identity, OFFSET>,
ReportInstanceHealth: ReportInstanceHealth::<Identity, OFFSET>,
ReportPartitionHealth: ReportPartitionHealth::<Identity, OFFSET>,
ReportConfiguration: ReportConfiguration::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricSelfReconfiguringServicePartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricSelfReconfiguringServicePartition {}
windows_core::imp::define_interface!(
IFabricServiceGroupFactory,
IFabricServiceGroupFactory_Vtbl,
0x3860d61d_1e51_4a65_b109_d93c11311657
);
windows_core::imp::interface_hierarchy!(IFabricServiceGroupFactory, windows_core::IUnknown);
#[repr(C)]
#[doc(hidden)]
pub struct IFabricServiceGroupFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
}
unsafe impl Send for IFabricServiceGroupFactory {}
unsafe impl Sync for IFabricServiceGroupFactory {}
pub trait IFabricServiceGroupFactory_Impl: windows_core::IUnknownImpl {}
impl IFabricServiceGroupFactory_Vtbl {
pub const fn new<Identity: IFabricServiceGroupFactory_Impl, const OFFSET: isize>() -> Self {
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricServiceGroupFactory as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricServiceGroupFactory {}
windows_core::imp::define_interface!(
IFabricServiceGroupFactoryBuilder,
IFabricServiceGroupFactoryBuilder_Vtbl,
0xa9fe8b06_19b1_49e6_8911_41d9d9219e1c
);
windows_core::imp::interface_hierarchy!(IFabricServiceGroupFactoryBuilder, windows_core::IUnknown);
impl IFabricServiceGroupFactoryBuilder {
pub unsafe fn AddStatelessServiceFactory<P0, P1>(
&self,
memberservicetype: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatelessServiceFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).AddStatelessServiceFactory)(
windows_core::Interface::as_raw(self),
memberservicetype.param().abi(),
factory.param().abi(),
)
}
}
pub unsafe fn AddStatefulServiceFactory<P0, P1>(
&self,
memberservicetype: P0,
factory: P1,
) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<IFabricStatefulServiceFactory>,
{
unsafe {
(windows_core::Interface::vtable(self).AddStatefulServiceFactory)(
windows_core::Interface::as_raw(self),
memberservicetype.param().abi(),
factory.param().abi(),
)
}
}
pub unsafe fn RemoveServiceFactory<P0>(&self, memberservicetype: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
(windows_core::Interface::vtable(self).RemoveServiceFactory)(
windows_core::Interface::as_raw(self),
memberservicetype.param().abi(),
)
}
}
pub unsafe fn ToServiceGroupFactory(&self) -> windows_core::Result<IFabricServiceGroupFactory> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).ToServiceGroupFactory)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricServiceGroupFactoryBuilder_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub AddStatelessServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub AddStatefulServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub RemoveServiceFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
) -> windows_core::HRESULT,
pub ToServiceGroupFactory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricServiceGroupFactoryBuilder {}
unsafe impl Sync for IFabricServiceGroupFactoryBuilder {}
pub trait IFabricServiceGroupFactoryBuilder_Impl: windows_core::IUnknownImpl {
fn AddStatelessServiceFactory(
&self,
memberservicetype: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatelessServiceFactory>,
) -> windows_core::Result<()>;
fn AddStatefulServiceFactory(
&self,
memberservicetype: &windows_core::PCWSTR,
factory: windows_core::Ref<IFabricStatefulServiceFactory>,
) -> windows_core::Result<()>;
fn RemoveServiceFactory(
&self,
memberservicetype: &windows_core::PCWSTR,
) -> windows_core::Result<()>;
fn ToServiceGroupFactory(&self) -> windows_core::Result<IFabricServiceGroupFactory>;
}
impl IFabricServiceGroupFactoryBuilder_Vtbl {
pub const fn new<Identity: IFabricServiceGroupFactoryBuilder_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn AddStatelessServiceFactory<
Identity: IFabricServiceGroupFactoryBuilder_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
memberservicetype: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricServiceGroupFactoryBuilder_Impl::AddStatelessServiceFactory(
this,
core::mem::transmute(&memberservicetype),
core::mem::transmute_copy(&factory),
)
.into()
}
}
unsafe extern "system" fn AddStatefulServiceFactory<
Identity: IFabricServiceGroupFactoryBuilder_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
memberservicetype: windows_core::PCWSTR,
factory: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricServiceGroupFactoryBuilder_Impl::AddStatefulServiceFactory(
this,
core::mem::transmute(&memberservicetype),
core::mem::transmute_copy(&factory),
)
.into()
}
}
unsafe extern "system" fn RemoveServiceFactory<
Identity: IFabricServiceGroupFactoryBuilder_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
memberservicetype: windows_core::PCWSTR,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricServiceGroupFactoryBuilder_Impl::RemoveServiceFactory(
this,
core::mem::transmute(&memberservicetype),
)
.into()
}
}
unsafe extern "system" fn ToServiceGroupFactory<
Identity: IFabricServiceGroupFactoryBuilder_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
factory: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricServiceGroupFactoryBuilder_Impl::ToServiceGroupFactory(this) {
Ok(ok__) => {
factory.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
AddStatelessServiceFactory: AddStatelessServiceFactory::<Identity, OFFSET>,
AddStatefulServiceFactory: AddStatefulServiceFactory::<Identity, OFFSET>,
RemoveServiceFactory: RemoveServiceFactory::<Identity, OFFSET>,
ToServiceGroupFactory: ToServiceGroupFactory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricServiceGroupFactoryBuilder as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricServiceGroupFactoryBuilder {}
windows_core::imp::define_interface!(
IFabricServiceGroupPartition,
IFabricServiceGroupPartition_Vtbl,
0x2b24299a_7489_467f_8e7f_4507bff73b86
);
windows_core::imp::interface_hierarchy!(IFabricServiceGroupPartition, windows_core::IUnknown);
impl IFabricServiceGroupPartition {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ResolveMember<T>(
&self,
name: super::FabricTypes::FABRIC_URI,
) -> windows_core::Result<T>
where
T: windows_core::Interface,
{
let mut result__ = core::ptr::null_mut();
unsafe {
(windows_core::Interface::vtable(self).ResolveMember)(
windows_core::Interface::as_raw(self),
name,
&T::IID,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricServiceGroupPartition_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ResolveMember: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_URI,
*const windows_core::GUID,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ResolveMember: usize,
}
unsafe impl Send for IFabricServiceGroupPartition {}
unsafe impl Sync for IFabricServiceGroupPartition {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricServiceGroupPartition_Impl: windows_core::IUnknownImpl {
fn ResolveMember(
&self,
name: &super::FabricTypes::FABRIC_URI,
riid: *const windows_core::GUID,
member: *mut *mut core::ffi::c_void,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricServiceGroupPartition_Vtbl {
pub const fn new<Identity: IFabricServiceGroupPartition_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ResolveMember<
Identity: IFabricServiceGroupPartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
name: super::FabricTypes::FABRIC_URI,
riid: *const windows_core::GUID,
member: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricServiceGroupPartition_Impl::ResolveMember(
this,
core::mem::transmute(&name),
core::mem::transmute_copy(&riid),
core::mem::transmute_copy(&member),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
ResolveMember: ResolveMember::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricServiceGroupPartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricServiceGroupPartition {}
windows_core::imp::define_interface!(
IFabricStateProvider,
IFabricStateProvider_Vtbl,
0x3ebfec79_bd27_43f3_8be8_da38ee723951
);
windows_core::imp::interface_hierarchy!(IFabricStateProvider, windows_core::IUnknown);
impl IFabricStateProvider {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginUpdateEpoch<P2>(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
previousepochlastsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginUpdateEpoch)(
windows_core::Interface::as_raw(self),
epoch,
previousepochlastsequencenumber,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndUpdateEpoch<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndUpdateEpoch)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetLastCommittedSequenceNumber(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetLastCommittedSequenceNumber)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOnDataLoss<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOnDataLoss)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOnDataLoss<P0>(&self, context: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOnDataLoss)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn GetCopyContext(&self) -> windows_core::Result<IFabricOperationDataStream> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCopyContext)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetCopyState<P1>(
&self,
uptosequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
copycontextstream: P1,
) -> windows_core::Result<IFabricOperationDataStream>
where
P1: windows_core::Param<IFabricOperationDataStream>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCopyState)(
windows_core::Interface::as_raw(self),
uptosequencenumber,
copycontextstream.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStateProvider_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginUpdateEpoch: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_EPOCH,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginUpdateEpoch: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndUpdateEpoch: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndUpdateEpoch: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetLastCommittedSequenceNumber: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetLastCommittedSequenceNumber: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOnDataLoss: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOnDataLoss: usize,
pub GetCopyContext: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetCopyState: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetCopyState: usize,
}
unsafe impl Send for IFabricStateProvider {}
unsafe impl Sync for IFabricStateProvider {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricStateProvider_Impl: windows_core::IUnknownImpl {
fn BeginUpdateEpoch(
&self,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
previousepochlastsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndUpdateEpoch(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn GetLastCommittedSequenceNumber(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn BeginOnDataLoss(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOnDataLoss(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<bool>;
fn GetCopyContext(&self) -> windows_core::Result<IFabricOperationDataStream>;
fn GetCopyState(
&self,
uptosequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
copycontextstream: windows_core::Ref<IFabricOperationDataStream>,
) -> windows_core::Result<IFabricOperationDataStream>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricStateProvider_Vtbl {
pub const fn new<Identity: IFabricStateProvider_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginUpdateEpoch<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
epoch: *const super::FabricTypes::FABRIC_EPOCH,
previousepochlastsequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::BeginUpdateEpoch(
this,
core::mem::transmute_copy(&epoch),
core::mem::transmute_copy(&previousepochlastsequencenumber),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndUpdateEpoch<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStateProvider_Impl::EndUpdateEpoch(this, core::mem::transmute_copy(&context))
.into()
}
}
unsafe extern "system" fn GetLastCommittedSequenceNumber<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
sequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::GetLastCommittedSequenceNumber(this) {
Ok(ok__) => {
sequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginOnDataLoss<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::BeginOnDataLoss(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOnDataLoss<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
isstatechanged: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::EndOnDataLoss(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
isstatechanged.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCopyContext<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
copycontextstream: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::GetCopyContext(this) {
Ok(ok__) => {
copycontextstream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCopyState<
Identity: IFabricStateProvider_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
uptosequencenumber: super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
copycontextstream: *mut core::ffi::c_void,
copystatestream: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateProvider_Impl::GetCopyState(
this,
core::mem::transmute_copy(&uptosequencenumber),
core::mem::transmute_copy(©contextstream),
) {
Ok(ok__) => {
copystatestream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginUpdateEpoch: BeginUpdateEpoch::<Identity, OFFSET>,
EndUpdateEpoch: EndUpdateEpoch::<Identity, OFFSET>,
GetLastCommittedSequenceNumber: GetLastCommittedSequenceNumber::<Identity, OFFSET>,
BeginOnDataLoss: BeginOnDataLoss::<Identity, OFFSET>,
EndOnDataLoss: EndOnDataLoss::<Identity, OFFSET>,
GetCopyContext: GetCopyContext::<Identity, OFFSET>,
GetCopyState: GetCopyState::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStateProvider as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricStateProvider {}
windows_core::imp::define_interface!(
IFabricStateReplicator,
IFabricStateReplicator_Vtbl,
0x89e9a978_c771_44f2_92e8_3bf271cabe9c
);
windows_core::imp::interface_hierarchy!(IFabricStateReplicator, windows_core::IUnknown);
impl IFabricStateReplicator {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginReplicate<P0, P1>(
&self,
operationdata: P0,
callback: P1,
sequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<IFabricOperationData>,
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginReplicate)(
windows_core::Interface::as_raw(self),
operationdata.param().abi(),
callback.param().abi(),
sequencenumber as _,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn EndReplicate<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndReplicate)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn GetReplicationStream(&self) -> windows_core::Result<IFabricOperationStream> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetReplicationStream)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn GetCopyStream(&self) -> windows_core::Result<IFabricOperationStream> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetCopyStream)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn UpdateReplicatorSettings(
&self,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).UpdateReplicatorSettings)(
windows_core::Interface::as_raw(self),
replicatorsettings,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStateReplicator_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginReplicate: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginReplicate: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub EndReplicate: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
EndReplicate: usize,
pub GetReplicationStream: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub GetCopyStream: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub UpdateReplicatorSettings: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
UpdateReplicatorSettings: usize,
}
unsafe impl Send for IFabricStateReplicator {}
unsafe impl Sync for IFabricStateReplicator {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricStateReplicator_Impl: windows_core::IUnknownImpl {
fn BeginReplicate(
&self,
operationdata: windows_core::Ref<IFabricOperationData>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
sequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndReplicate(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn GetReplicationStream(&self) -> windows_core::Result<IFabricOperationStream>;
fn GetCopyStream(&self) -> windows_core::Result<IFabricOperationStream>;
fn UpdateReplicatorSettings(
&self,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::Result<()>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricStateReplicator_Vtbl {
pub const fn new<Identity: IFabricStateReplicator_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginReplicate<
Identity: IFabricStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
operationdata: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
sequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateReplicator_Impl::BeginReplicate(
this,
core::mem::transmute_copy(&operationdata),
core::mem::transmute_copy(&callback),
core::mem::transmute_copy(&sequencenumber),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndReplicate<
Identity: IFabricStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
sequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateReplicator_Impl::EndReplicate(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
sequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReplicationStream<
Identity: IFabricStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
stream: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateReplicator_Impl::GetReplicationStream(this) {
Ok(ok__) => {
stream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetCopyStream<
Identity: IFabricStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
stream: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateReplicator_Impl::GetCopyStream(this) {
Ok(ok__) => {
stream.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn UpdateReplicatorSettings<
Identity: IFabricStateReplicator_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStateReplicator_Impl::UpdateReplicatorSettings(
this,
core::mem::transmute_copy(&replicatorsettings),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginReplicate: BeginReplicate::<Identity, OFFSET>,
EndReplicate: EndReplicate::<Identity, OFFSET>,
GetReplicationStream: GetReplicationStream::<Identity, OFFSET>,
GetCopyStream: GetCopyStream::<Identity, OFFSET>,
UpdateReplicatorSettings: UpdateReplicatorSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStateReplicator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricStateReplicator {}
windows_core::imp::define_interface!(
IFabricStateReplicator2,
IFabricStateReplicator2_Vtbl,
0x4a28d542_658f_46f9_9bf4_79b7cae25c5d
);
impl core::ops::Deref for IFabricStateReplicator2 {
type Target = IFabricStateReplicator;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStateReplicator2,
windows_core::IUnknown,
IFabricStateReplicator
);
impl IFabricStateReplicator2 {
pub unsafe fn GetReplicatorSettings(
&self,
) -> windows_core::Result<IFabricReplicatorSettingsResult> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetReplicatorSettings)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStateReplicator2_Vtbl {
pub base__: IFabricStateReplicator_Vtbl,
pub GetReplicatorSettings: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricStateReplicator2 {}
unsafe impl Sync for IFabricStateReplicator2 {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricStateReplicator2_Impl: IFabricStateReplicator_Impl {
fn GetReplicatorSettings(&self) -> windows_core::Result<IFabricReplicatorSettingsResult>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricStateReplicator2_Vtbl {
pub const fn new<Identity: IFabricStateReplicator2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetReplicatorSettings<
Identity: IFabricStateReplicator2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
replicatorsettings: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStateReplicator2_Impl::GetReplicatorSettings(this) {
Ok(ok__) => {
replicatorsettings.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricStateReplicator_Vtbl::new::<Identity, OFFSET>(),
GetReplicatorSettings: GetReplicatorSettings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStateReplicator2 as windows_core::Interface>::IID
|| iid == &<IFabricStateReplicator as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricStateReplicator2 {}
windows_core::imp::define_interface!(
IFabricStatefulServiceFactory,
IFabricStatefulServiceFactory_Vtbl,
0x77ff0c6b_6780_48ec_b4b0_61989327b0f2
);
windows_core::imp::interface_hierarchy!(IFabricStatefulServiceFactory, windows_core::IUnknown);
impl IFabricStatefulServiceFactory {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateReplica<P0>(
&self,
servicetypename: P0,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::Result<IFabricStatefulServiceReplica>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateReplica)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
servicename,
initializationdatalength,
initializationdata,
partitionid,
replicaid,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServiceFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateReplica: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_URI,
u32,
*const u8,
super::FabricTypes::FABRIC_PARTITION_ID,
super::FabricTypes::FABRIC_REPLICA_ID,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateReplica: usize,
}
unsafe impl Send for IFabricStatefulServiceFactory {}
unsafe impl Sync for IFabricStatefulServiceFactory {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatefulServiceFactory_Impl: windows_core::IUnknownImpl {
fn CreateReplica(
&self,
servicetypename: &windows_core::PCWSTR,
servicename: &super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: &super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
) -> windows_core::Result<IFabricStatefulServiceReplica>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatefulServiceFactory_Vtbl {
pub const fn new<Identity: IFabricStatefulServiceFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateReplica<
Identity: IFabricStatefulServiceFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
replicaid: super::FabricTypes::FABRIC_REPLICA_ID,
servicereplica: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceFactory_Impl::CreateReplica(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute(&servicename),
core::mem::transmute_copy(&initializationdatalength),
core::mem::transmute_copy(&initializationdata),
core::mem::transmute(&partitionid),
core::mem::transmute_copy(&replicaid),
) {
Ok(ok__) => {
servicereplica.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateReplica: CreateReplica::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServiceFactory as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatefulServiceFactory {}
windows_core::imp::define_interface!(
IFabricStatefulServicePartition,
IFabricStatefulServicePartition_Vtbl,
0x5beccc37_8655_4f20_bd43_f50691d7cd16
);
windows_core::imp::interface_hierarchy!(IFabricStatefulServicePartition, windows_core::IUnknown);
impl IFabricStatefulServicePartition {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPartitionInfo)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetReadStatus(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetReadStatus)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetWriteStatus(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetWriteStatus)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateReplicator<P0>(
&self,
stateprovider: P0,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
replicator: *mut Option<IFabricReplicator>,
) -> windows_core::Result<IFabricStateReplicator>
where
P0: windows_core::Param<IFabricStateProvider>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateReplicator)(
windows_core::Interface::as_raw(self),
stateprovider.param().abi(),
replicatorsettings,
core::mem::transmute(replicator),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportLoad)(
windows_core::Interface::as_raw(self),
metriccount,
metrics,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportFault)(
windows_core::Interface::as_raw(self),
faulttype,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServicePartition_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetPartitionInfo: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetPartitionInfo: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetReadStatus: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetReadStatus: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetWriteStatus: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetWriteStatus: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateReplicator: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
*mut *mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateReplicator: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportLoad: unsafe extern "system" fn(
*mut core::ffi::c_void,
u32,
*const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportLoad: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportFault: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportFault: usize,
}
unsafe impl Send for IFabricStatefulServicePartition {}
unsafe impl Sync for IFabricStatefulServicePartition {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatefulServicePartition_Impl: windows_core::IUnknownImpl {
fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION>;
fn GetReadStatus(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS>;
fn GetWriteStatus(
&self,
) -> windows_core::Result<super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS>;
fn CreateReplicator(
&self,
stateprovider: windows_core::Ref<IFabricStateProvider>,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
replicator: windows_core::OutRef<IFabricReplicator>,
) -> windows_core::Result<IFabricStateReplicator>;
fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::Result<()>;
fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatefulServicePartition_Vtbl {
pub const fn new<Identity: IFabricStatefulServicePartition_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn GetPartitionInfo<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServicePartition_Impl::GetPartitionInfo(this) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetReadStatus<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
readstatus: *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServicePartition_Impl::GetReadStatus(this) {
Ok(ok__) => {
readstatus.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn GetWriteStatus<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
writestatus: *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_ACCESS_STATUS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServicePartition_Impl::GetWriteStatus(this) {
Ok(ok__) => {
writestatus.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CreateReplicator<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
stateprovider: *mut core::ffi::c_void,
replicatorsettings: *const super::FabricTypes::FABRIC_REPLICATOR_SETTINGS,
replicator: *mut *mut core::ffi::c_void,
statereplicator: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServicePartition_Impl::CreateReplicator(
this,
core::mem::transmute_copy(&stateprovider),
core::mem::transmute_copy(&replicatorsettings),
core::mem::transmute_copy(&replicator),
) {
Ok(ok__) => {
statereplicator.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ReportLoad<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition_Impl::ReportLoad(
this,
core::mem::transmute_copy(&metriccount),
core::mem::transmute_copy(&metrics),
)
.into()
}
}
unsafe extern "system" fn ReportFault<
Identity: IFabricStatefulServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition_Impl::ReportFault(
this,
core::mem::transmute_copy(&faulttype),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetPartitionInfo: GetPartitionInfo::<Identity, OFFSET>,
GetReadStatus: GetReadStatus::<Identity, OFFSET>,
GetWriteStatus: GetWriteStatus::<Identity, OFFSET>,
CreateReplicator: CreateReplicator::<Identity, OFFSET>,
ReportLoad: ReportLoad::<Identity, OFFSET>,
ReportFault: ReportFault::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServicePartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatefulServicePartition {}
windows_core::imp::define_interface!(
IFabricStatefulServicePartition1,
IFabricStatefulServicePartition1_Vtbl,
0xc9c66f2f_9dff_4c87_bbe4_a08b4c4074cf
);
impl core::ops::Deref for IFabricStatefulServicePartition1 {
type Target = IFabricStatefulServicePartition;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatefulServicePartition1,
windows_core::IUnknown,
IFabricStatefulServicePartition
);
impl IFabricStatefulServicePartition1 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportMoveCost)(
windows_core::Interface::as_raw(self),
movecost,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServicePartition1_Vtbl {
pub base__: IFabricStatefulServicePartition_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportMoveCost: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportMoveCost: usize,
}
unsafe impl Send for IFabricStatefulServicePartition1 {}
unsafe impl Sync for IFabricStatefulServicePartition1 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatefulServicePartition1_Impl: IFabricStatefulServicePartition_Impl {
fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatefulServicePartition1_Vtbl {
pub const fn new<Identity: IFabricStatefulServicePartition1_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportMoveCost<
Identity: IFabricStatefulServicePartition1_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition1_Impl::ReportMoveCost(
this,
core::mem::transmute_copy(&movecost),
)
.into()
}
}
Self {
base__: IFabricStatefulServicePartition_Vtbl::new::<Identity, OFFSET>(),
ReportMoveCost: ReportMoveCost::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServicePartition1 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatefulServicePartition1 {}
windows_core::imp::define_interface!(
IFabricStatefulServicePartition2,
IFabricStatefulServicePartition2_Vtbl,
0xdf27b476_fa25_459f_a7d3_87d3eec9c73c
);
impl core::ops::Deref for IFabricStatefulServicePartition2 {
type Target = IFabricStatefulServicePartition1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatefulServicePartition2,
windows_core::IUnknown,
IFabricStatefulServicePartition,
IFabricStatefulServicePartition1
);
impl IFabricStatefulServicePartition2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportReplicaHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportReplicaHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportPartitionHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServicePartition2_Vtbl {
pub base__: IFabricStatefulServicePartition1_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportReplicaHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportReplicaHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportPartitionHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportPartitionHealth: usize,
}
unsafe impl Send for IFabricStatefulServicePartition2 {}
unsafe impl Sync for IFabricStatefulServicePartition2 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatefulServicePartition2_Impl: IFabricStatefulServicePartition1_Impl {
fn ReportReplicaHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatefulServicePartition2_Vtbl {
pub const fn new<Identity: IFabricStatefulServicePartition2_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportReplicaHealth<
Identity: IFabricStatefulServicePartition2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition2_Impl::ReportReplicaHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
unsafe extern "system" fn ReportPartitionHealth<
Identity: IFabricStatefulServicePartition2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition2_Impl::ReportPartitionHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
Self {
base__: IFabricStatefulServicePartition1_Vtbl::new::<Identity, OFFSET>(),
ReportReplicaHealth: ReportReplicaHealth::<Identity, OFFSET>,
ReportPartitionHealth: ReportPartitionHealth::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServicePartition2 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition1 as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatefulServicePartition2 {}
windows_core::imp::define_interface!(
IFabricStatefulServicePartition3,
IFabricStatefulServicePartition3_Vtbl,
0x51f1269d_b061_4c1c_96cf_6508cece813b
);
impl core::ops::Deref for IFabricStatefulServicePartition3 {
type Target = IFabricStatefulServicePartition2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatefulServicePartition3,
windows_core::IUnknown,
IFabricStatefulServicePartition,
IFabricStatefulServicePartition1,
IFabricStatefulServicePartition2
);
impl IFabricStatefulServicePartition3 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportReplicaHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportReplicaHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportPartitionHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportPartitionHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServicePartition3_Vtbl {
pub base__: IFabricStatefulServicePartition2_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportReplicaHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportReplicaHealth2: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportPartitionHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportPartitionHealth2: usize,
}
unsafe impl Send for IFabricStatefulServicePartition3 {}
unsafe impl Sync for IFabricStatefulServicePartition3 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatefulServicePartition3_Impl: IFabricStatefulServicePartition2_Impl {
fn ReportReplicaHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportPartitionHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatefulServicePartition3_Vtbl {
pub const fn new<Identity: IFabricStatefulServicePartition3_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportReplicaHealth2<
Identity: IFabricStatefulServicePartition3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition3_Impl::ReportReplicaHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportPartitionHealth2<
Identity: IFabricStatefulServicePartition3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServicePartition3_Impl::ReportPartitionHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
Self {
base__: IFabricStatefulServicePartition2_Vtbl::new::<Identity, OFFSET>(),
ReportReplicaHealth2: ReportReplicaHealth2::<Identity, OFFSET>,
ReportPartitionHealth2: ReportPartitionHealth2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServicePartition3 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition1 as windows_core::Interface>::IID
|| iid == &<IFabricStatefulServicePartition2 as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatefulServicePartition3 {}
windows_core::imp::define_interface!(
IFabricStatefulServiceReplica,
IFabricStatefulServiceReplica_Vtbl,
0x8ae3be0e_505d_4dc1_ad8f_0cb0f9576b8a
);
windows_core::imp::interface_hierarchy!(IFabricStatefulServiceReplica, windows_core::IUnknown);
impl IFabricStatefulServiceReplica {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginOpen<P1, P2>(
&self,
openmode: super::FabricTypes::FABRIC_REPLICA_OPEN_MODE,
partition: P1,
callback: P2,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<IFabricStatefulServicePartition>,
P2: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOpen)(
windows_core::Interface::as_raw(self),
openmode,
partition.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOpen<P0>(&self, context: P0) -> windows_core::Result<IFabricReplicator>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOpen)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginChangeRole<P1>(
&self,
newrole: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginChangeRole)(
windows_core::Interface::as_raw(self),
newrole,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndChangeRole<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndChangeRole)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginClose<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginClose)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndClose<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndClose)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn Abort(&self) {
unsafe {
(windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatefulServiceReplica_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_REPLICA_OPEN_MODE,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOpen: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginChangeRole: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_REPLICA_ROLE,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginChangeRole: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndChangeRole: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndChangeRole: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginClose: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndClose: usize,
pub Abort: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricStatefulServiceReplica {}
unsafe impl Sync for IFabricStatefulServiceReplica {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricStatefulServiceReplica_Impl: windows_core::IUnknownImpl {
fn BeginOpen(
&self,
openmode: super::FabricTypes::FABRIC_REPLICA_OPEN_MODE,
partition: windows_core::Ref<IFabricStatefulServicePartition>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOpen(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<IFabricReplicator>;
fn BeginChangeRole(
&self,
newrole: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndChangeRole(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
fn BeginClose(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndClose(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn Abort(&self);
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricStatefulServiceReplica_Vtbl {
pub const fn new<Identity: IFabricStatefulServiceReplica_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginOpen<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
openmode: super::FabricTypes::FABRIC_REPLICA_OPEN_MODE,
partition: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceReplica_Impl::BeginOpen(
this,
core::mem::transmute_copy(&openmode),
core::mem::transmute_copy(&partition),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOpen<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
replicator: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceReplica_Impl::EndOpen(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
replicator.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginChangeRole<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
newrole: super::FabricTypes::FABRIC_REPLICA_ROLE,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceReplica_Impl::BeginChangeRole(
this,
core::mem::transmute_copy(&newrole),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndChangeRole<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
serviceaddress: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceReplica_Impl::EndChangeRole(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
serviceaddress.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginClose<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatefulServiceReplica_Impl::BeginClose(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndClose<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServiceReplica_Impl::EndClose(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn Abort<
Identity: IFabricStatefulServiceReplica_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatefulServiceReplica_Impl::Abort(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginOpen: BeginOpen::<Identity, OFFSET>,
EndOpen: EndOpen::<Identity, OFFSET>,
BeginChangeRole: BeginChangeRole::<Identity, OFFSET>,
EndChangeRole: EndChangeRole::<Identity, OFFSET>,
BeginClose: BeginClose::<Identity, OFFSET>,
EndClose: EndClose::<Identity, OFFSET>,
Abort: Abort::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatefulServiceReplica as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricStatefulServiceReplica {}
windows_core::imp::define_interface!(
IFabricStatelessServiceFactory,
IFabricStatelessServiceFactory_Vtbl,
0xcc53af8f_74cd_11df_ac3e_0024811e3892
);
windows_core::imp::interface_hierarchy!(IFabricStatelessServiceFactory, windows_core::IUnknown);
impl IFabricStatelessServiceFactory {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn CreateInstance<P0>(
&self,
servicetypename: P0,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
) -> windows_core::Result<IFabricStatelessServiceInstance>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).CreateInstance)(
windows_core::Interface::as_raw(self),
servicetypename.param().abi(),
servicename,
initializationdatalength,
initializationdata,
partitionid,
instanceid,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServiceFactory_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub CreateInstance: unsafe extern "system" fn(
*mut core::ffi::c_void,
windows_core::PCWSTR,
super::FabricTypes::FABRIC_URI,
u32,
*const u8,
super::FabricTypes::FABRIC_PARTITION_ID,
super::FabricTypes::FABRIC_INSTANCE_ID,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
CreateInstance: usize,
}
unsafe impl Send for IFabricStatelessServiceFactory {}
unsafe impl Sync for IFabricStatelessServiceFactory {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServiceFactory_Impl: windows_core::IUnknownImpl {
fn CreateInstance(
&self,
servicetypename: &windows_core::PCWSTR,
servicename: &super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: &super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
) -> windows_core::Result<IFabricStatelessServiceInstance>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServiceFactory_Vtbl {
pub const fn new<Identity: IFabricStatelessServiceFactory_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn CreateInstance<
Identity: IFabricStatelessServiceFactory_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
servicetypename: windows_core::PCWSTR,
servicename: super::FabricTypes::FABRIC_URI,
initializationdatalength: u32,
initializationdata: *const u8,
partitionid: super::FabricTypes::FABRIC_PARTITION_ID,
instanceid: super::FabricTypes::FABRIC_INSTANCE_ID,
serviceinstance: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatelessServiceFactory_Impl::CreateInstance(
this,
core::mem::transmute(&servicetypename),
core::mem::transmute(&servicename),
core::mem::transmute_copy(&initializationdatalength),
core::mem::transmute_copy(&initializationdata),
core::mem::transmute(&partitionid),
core::mem::transmute_copy(&instanceid),
) {
Ok(ok__) => {
serviceinstance.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
CreateInstance: CreateInstance::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServiceFactory as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServiceFactory {}
windows_core::imp::define_interface!(
IFabricStatelessServiceInstance,
IFabricStatelessServiceInstance_Vtbl,
0xcc53af90_74cd_11df_ac3e_0024811e3892
);
windows_core::imp::interface_hierarchy!(IFabricStatelessServiceInstance, windows_core::IUnknown);
impl IFabricStatelessServiceInstance {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOpen<P0, P1>(
&self,
partition: P0,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<IFabricStatelessServicePartition>,
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOpen)(
windows_core::Interface::as_raw(self),
partition.param().abi(),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOpen<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOpen)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginClose<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginClose)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndClose<P0>(&self, context: P0) -> windows_core::HRESULT
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).EndClose)(
windows_core::Interface::as_raw(self),
context.param().abi(),
)
}
}
pub unsafe fn Abort(&self) {
unsafe {
(windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServiceInstance_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOpen: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOpen: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginClose: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndClose: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndClose: usize,
pub Abort: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricStatelessServiceInstance {}
unsafe impl Sync for IFabricStatelessServiceInstance {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricStatelessServiceInstance_Impl: windows_core::IUnknownImpl {
fn BeginOpen(
&self,
partition: windows_core::Ref<IFabricStatelessServicePartition>,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOpen(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricCommon::IFabricStringResult>;
fn BeginClose(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndClose(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<()>;
fn Abort(&self);
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricStatelessServiceInstance_Vtbl {
pub const fn new<Identity: IFabricStatelessServiceInstance_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn BeginOpen<
Identity: IFabricStatelessServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
partition: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatelessServiceInstance_Impl::BeginOpen(
this,
core::mem::transmute_copy(&partition),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOpen<
Identity: IFabricStatelessServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
serviceaddress: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatelessServiceInstance_Impl::EndOpen(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
serviceaddress.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn BeginClose<
Identity: IFabricStatelessServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatelessServiceInstance_Impl::BeginClose(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndClose<
Identity: IFabricStatelessServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServiceInstance_Impl::EndClose(
this,
core::mem::transmute_copy(&context),
)
.into()
}
}
unsafe extern "system" fn Abort<
Identity: IFabricStatelessServiceInstance_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServiceInstance_Impl::Abort(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginOpen: BeginOpen::<Identity, OFFSET>,
EndOpen: EndOpen::<Identity, OFFSET>,
BeginClose: BeginClose::<Identity, OFFSET>,
EndClose: EndClose::<Identity, OFFSET>,
Abort: Abort::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServiceInstance as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricStatelessServiceInstance {}
windows_core::imp::define_interface!(
IFabricStatelessServicePartition,
IFabricStatelessServicePartition_Vtbl,
0xcc53af91_74cd_11df_ac3e_0024811e3892
);
windows_core::imp::interface_hierarchy!(IFabricStatelessServicePartition, windows_core::IUnknown);
impl IFabricStatelessServicePartition {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetPartitionInfo)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.map(|| result__)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportLoad)(
windows_core::Interface::as_raw(self),
metriccount,
metrics,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportFault)(
windows_core::Interface::as_raw(self),
faulttype,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServicePartition_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub GetPartitionInfo: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
GetPartitionInfo: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportLoad: unsafe extern "system" fn(
*mut core::ffi::c_void,
u32,
*const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportLoad: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportFault: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportFault: usize,
}
unsafe impl Send for IFabricStatelessServicePartition {}
unsafe impl Sync for IFabricStatelessServicePartition {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServicePartition_Impl: windows_core::IUnknownImpl {
fn GetPartitionInfo(
&self,
) -> windows_core::Result<*mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION>;
fn ReportLoad(
&self,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::Result<()>;
fn ReportFault(
&self,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServicePartition_Vtbl {
pub const fn new<Identity: IFabricStatelessServicePartition_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn GetPartitionInfo<
Identity: IFabricStatelessServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
bufferedvalue: *mut *mut super::FabricTypes::FABRIC_SERVICE_PARTITION_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStatelessServicePartition_Impl::GetPartitionInfo(this) {
Ok(ok__) => {
bufferedvalue.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ReportLoad<
Identity: IFabricStatelessServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
metriccount: u32,
metrics: *const super::FabricTypes::FABRIC_LOAD_METRIC,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition_Impl::ReportLoad(
this,
core::mem::transmute_copy(&metriccount),
core::mem::transmute_copy(&metrics),
)
.into()
}
}
unsafe extern "system" fn ReportFault<
Identity: IFabricStatelessServicePartition_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
faulttype: super::FabricTypes::FABRIC_FAULT_TYPE,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition_Impl::ReportFault(
this,
core::mem::transmute_copy(&faulttype),
)
.into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetPartitionInfo: GetPartitionInfo::<Identity, OFFSET>,
ReportLoad: ReportLoad::<Identity, OFFSET>,
ReportFault: ReportFault::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServicePartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServicePartition {}
windows_core::imp::define_interface!(
IFabricStatelessServicePartition1,
IFabricStatelessServicePartition1_Vtbl,
0xbf6bb505_7bd0_4371_b6c0_cba319a5e50b
);
impl core::ops::Deref for IFabricStatelessServicePartition1 {
type Target = IFabricStatelessServicePartition;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatelessServicePartition1,
windows_core::IUnknown,
IFabricStatelessServicePartition
);
impl IFabricStatelessServicePartition1 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportMoveCost)(
windows_core::Interface::as_raw(self),
movecost,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServicePartition1_Vtbl {
pub base__: IFabricStatelessServicePartition_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportMoveCost: unsafe extern "system" fn(
*mut core::ffi::c_void,
super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportMoveCost: usize,
}
unsafe impl Send for IFabricStatelessServicePartition1 {}
unsafe impl Sync for IFabricStatelessServicePartition1 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServicePartition1_Impl: IFabricStatelessServicePartition_Impl {
fn ReportMoveCost(
&self,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServicePartition1_Vtbl {
pub const fn new<Identity: IFabricStatelessServicePartition1_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportMoveCost<
Identity: IFabricStatelessServicePartition1_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
movecost: super::FabricTypes::FABRIC_MOVE_COST,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition1_Impl::ReportMoveCost(
this,
core::mem::transmute_copy(&movecost),
)
.into()
}
}
Self {
base__: IFabricStatelessServicePartition_Vtbl::new::<Identity, OFFSET>(),
ReportMoveCost: ReportMoveCost::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServicePartition1 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServicePartition1 {}
windows_core::imp::define_interface!(
IFabricStatelessServicePartition2,
IFabricStatelessServicePartition2_Vtbl,
0x9ff35b6c_9d97_4312_93ad_7f34cbdb4ca4
);
impl core::ops::Deref for IFabricStatelessServicePartition2 {
type Target = IFabricStatelessServicePartition1;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatelessServicePartition2,
windows_core::IUnknown,
IFabricStatelessServicePartition,
IFabricStatelessServicePartition1
);
impl IFabricStatelessServicePartition2 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportInstanceHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportInstanceHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportPartitionHealth)(
windows_core::Interface::as_raw(self),
healthinfo,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServicePartition2_Vtbl {
pub base__: IFabricStatelessServicePartition1_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportInstanceHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportInstanceHealth: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportPartitionHealth: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportPartitionHealth: usize,
}
unsafe impl Send for IFabricStatelessServicePartition2 {}
unsafe impl Sync for IFabricStatelessServicePartition2 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServicePartition2_Impl: IFabricStatelessServicePartition1_Impl {
fn ReportInstanceHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
fn ReportPartitionHealth(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServicePartition2_Vtbl {
pub const fn new<Identity: IFabricStatelessServicePartition2_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportInstanceHealth<
Identity: IFabricStatelessServicePartition2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition2_Impl::ReportInstanceHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
unsafe extern "system" fn ReportPartitionHealth<
Identity: IFabricStatelessServicePartition2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition2_Impl::ReportPartitionHealth(
this,
core::mem::transmute_copy(&healthinfo),
)
.into()
}
}
Self {
base__: IFabricStatelessServicePartition1_Vtbl::new::<Identity, OFFSET>(),
ReportInstanceHealth: ReportInstanceHealth::<Identity, OFFSET>,
ReportPartitionHealth: ReportPartitionHealth::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServicePartition2 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition1 as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServicePartition2 {}
windows_core::imp::define_interface!(
IFabricStatelessServicePartition3,
IFabricStatelessServicePartition3_Vtbl,
0xf2fa2000_70a7_4ed5_9d3e_0b7deca2433f
);
impl core::ops::Deref for IFabricStatelessServicePartition3 {
type Target = IFabricStatelessServicePartition2;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatelessServicePartition3,
windows_core::IUnknown,
IFabricStatelessServicePartition,
IFabricStatelessServicePartition1,
IFabricStatelessServicePartition2
);
impl IFabricStatelessServicePartition3 {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportInstanceHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportInstanceHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn ReportPartitionHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportPartitionHealth2)(
windows_core::Interface::as_raw(self),
healthinfo,
sendoptions,
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServicePartition3_Vtbl {
pub base__: IFabricStatelessServicePartition2_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportInstanceHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportInstanceHealth2: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub ReportPartitionHealth2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
*const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
ReportPartitionHealth2: usize,
}
unsafe impl Send for IFabricStatelessServicePartition3 {}
unsafe impl Sync for IFabricStatelessServicePartition3 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServicePartition3_Impl: IFabricStatelessServicePartition2_Impl {
fn ReportInstanceHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
fn ReportPartitionHealth2(
&self,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServicePartition3_Vtbl {
pub const fn new<Identity: IFabricStatelessServicePartition3_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportInstanceHealth2<
Identity: IFabricStatelessServicePartition3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition3_Impl::ReportInstanceHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
unsafe extern "system" fn ReportPartitionHealth2<
Identity: IFabricStatelessServicePartition3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
healthinfo: *const super::FabricTypes::FABRIC_HEALTH_INFORMATION,
sendoptions: *const super::FabricTypes::FABRIC_HEALTH_REPORT_SEND_OPTIONS,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition3_Impl::ReportPartitionHealth2(
this,
core::mem::transmute_copy(&healthinfo),
core::mem::transmute_copy(&sendoptions),
)
.into()
}
}
Self {
base__: IFabricStatelessServicePartition2_Vtbl::new::<Identity, OFFSET>(),
ReportInstanceHealth2: ReportInstanceHealth2::<Identity, OFFSET>,
ReportPartitionHealth2: ReportPartitionHealth2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServicePartition3 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition1 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition2 as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServicePartition3 {}
windows_core::imp::define_interface!(
IFabricStatelessServicePartition4,
IFabricStatelessServicePartition4_Vtbl,
0x4e3c6976_b642_49a7_a323_46c316dd883d
);
impl core::ops::Deref for IFabricStatelessServicePartition4 {
type Target = IFabricStatelessServicePartition3;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStatelessServicePartition4,
windows_core::IUnknown,
IFabricStatelessServicePartition,
IFabricStatelessServicePartition1,
IFabricStatelessServicePartition2,
IFabricStatelessServicePartition3
);
impl IFabricStatelessServicePartition4 {
pub unsafe fn ReportCompletion(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).ReportCompletion)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStatelessServicePartition4_Vtbl {
pub base__: IFabricStatelessServicePartition3_Vtbl,
pub ReportCompletion:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricStatelessServicePartition4 {}
unsafe impl Sync for IFabricStatelessServicePartition4 {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricStatelessServicePartition4_Impl: IFabricStatelessServicePartition3_Impl {
fn ReportCompletion(&self) -> windows_core::Result<()>;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricStatelessServicePartition4_Vtbl {
pub const fn new<Identity: IFabricStatelessServicePartition4_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn ReportCompletion<
Identity: IFabricStatelessServicePartition4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStatelessServicePartition4_Impl::ReportCompletion(this).into()
}
}
Self {
base__: IFabricStatelessServicePartition3_Vtbl::new::<Identity, OFFSET>(),
ReportCompletion: ReportCompletion::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStatelessServicePartition4 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition1 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition2 as windows_core::Interface>::IID
|| iid == &<IFabricStatelessServicePartition3 as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricStatelessServicePartition4 {}
windows_core::imp::define_interface!(
IFabricStoreEventHandler,
IFabricStoreEventHandler_Vtbl,
0x220e6da4_985b_4dee_8fe9_77521b838795
);
windows_core::imp::interface_hierarchy!(IFabricStoreEventHandler, windows_core::IUnknown);
impl IFabricStoreEventHandler {
pub unsafe fn OnDataLoss(&self) {
unsafe {
(windows_core::Interface::vtable(self).OnDataLoss)(windows_core::Interface::as_raw(
self,
));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStoreEventHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub OnDataLoss: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricStoreEventHandler {}
unsafe impl Sync for IFabricStoreEventHandler {}
pub trait IFabricStoreEventHandler_Impl: windows_core::IUnknownImpl {
fn OnDataLoss(&self);
}
impl IFabricStoreEventHandler_Vtbl {
pub const fn new<Identity: IFabricStoreEventHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn OnDataLoss<
Identity: IFabricStoreEventHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStoreEventHandler_Impl::OnDataLoss(this);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
OnDataLoss: OnDataLoss::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStoreEventHandler as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricStoreEventHandler {}
windows_core::imp::define_interface!(
IFabricStoreEventHandler2,
IFabricStoreEventHandler2_Vtbl,
0xcce4523f_614b_4d6a_98a3_1e197c0213ea
);
impl core::ops::Deref for IFabricStoreEventHandler2 {
type Target = IFabricStoreEventHandler;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricStoreEventHandler2,
windows_core::IUnknown,
IFabricStoreEventHandler
);
impl IFabricStoreEventHandler2 {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginOnDataLoss<P0>(
&self,
callback: P0,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginOnDataLoss)(
windows_core::Interface::as_raw(self),
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndOnDataLoss<P0>(&self, context: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndOnDataLoss)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStoreEventHandler2_Vtbl {
pub base__: IFabricStoreEventHandler_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginOnDataLoss: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndOnDataLoss: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndOnDataLoss: usize,
}
unsafe impl Send for IFabricStoreEventHandler2 {}
unsafe impl Sync for IFabricStoreEventHandler2 {}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub trait IFabricStoreEventHandler2_Impl: IFabricStoreEventHandler_Impl {
fn BeginOnDataLoss(
&self,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndOnDataLoss(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<bool>;
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl IFabricStoreEventHandler2_Vtbl {
pub const fn new<Identity: IFabricStoreEventHandler2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginOnDataLoss<
Identity: IFabricStoreEventHandler2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStoreEventHandler2_Impl::BeginOnDataLoss(
this,
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndOnDataLoss<
Identity: IFabricStoreEventHandler2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
isstatechanged: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStoreEventHandler2_Impl::EndOnDataLoss(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
isstatechanged.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: IFabricStoreEventHandler_Vtbl::new::<Identity, OFFSET>(),
BeginOnDataLoss: BeginOnDataLoss::<Identity, OFFSET>,
EndOnDataLoss: EndOnDataLoss::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStoreEventHandler2 as windows_core::Interface>::IID
|| iid == &<IFabricStoreEventHandler as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
impl windows_core::RuntimeName for IFabricStoreEventHandler2 {}
windows_core::imp::define_interface!(
IFabricStorePostBackupHandler,
IFabricStorePostBackupHandler_Vtbl,
0x2af2e8a6_41df_4e32_9d2a_d73a711e652a
);
windows_core::imp::interface_hierarchy!(IFabricStorePostBackupHandler, windows_core::IUnknown);
impl IFabricStorePostBackupHandler {
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn BeginPostBackup<P1>(
&self,
info: *const super::FabricTypes::FABRIC_STORE_BACKUP_INFO,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginPostBackup)(
windows_core::Interface::as_raw(self),
info,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn EndPostBackup<P0>(&self, context: P0) -> windows_core::Result<bool>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndPostBackup)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStorePostBackupHandler_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub BeginPostBackup: unsafe extern "system" fn(
*mut core::ffi::c_void,
*const super::FabricTypes::FABRIC_STORE_BACKUP_INFO,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
BeginPostBackup: usize,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub EndPostBackup: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut bool,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
EndPostBackup: usize,
}
unsafe impl Send for IFabricStorePostBackupHandler {}
unsafe impl Sync for IFabricStorePostBackupHandler {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricStorePostBackupHandler_Impl: windows_core::IUnknownImpl {
fn BeginPostBackup(
&self,
info: *const super::FabricTypes::FABRIC_STORE_BACKUP_INFO,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndPostBackup(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<bool>;
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricStorePostBackupHandler_Vtbl {
pub const fn new<Identity: IFabricStorePostBackupHandler_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginPostBackup<
Identity: IFabricStorePostBackupHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
info: *const super::FabricTypes::FABRIC_STORE_BACKUP_INFO,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStorePostBackupHandler_Impl::BeginPostBackup(
this,
core::mem::transmute_copy(&info),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndPostBackup<
Identity: IFabricStorePostBackupHandler_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
status: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStorePostBackupHandler_Impl::EndPostBackup(
this,
core::mem::transmute_copy(&context),
) {
Ok(ok__) => {
status.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
BeginPostBackup: BeginPostBackup::<Identity, OFFSET>,
EndPostBackup: EndPostBackup::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStorePostBackupHandler as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricStorePostBackupHandler {}
windows_core::imp::define_interface!(
IFabricTransaction,
IFabricTransaction_Vtbl,
0x19ee48b4_6d4d_470b_ac1e_2d3996a173c8
);
impl core::ops::Deref for IFabricTransaction {
type Target = IFabricTransactionBase;
fn deref(&self) -> &Self::Target {
unsafe { core::mem::transmute(self) }
}
}
windows_core::imp::interface_hierarchy!(
IFabricTransaction,
windows_core::IUnknown,
IFabricTransactionBase
);
impl IFabricTransaction {
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub unsafe fn BeginCommit<P1>(
&self,
timeoutmilliseconds: u32,
callback: P1,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>
where
P1: windows_core::Param<super::FabricCommon::IFabricAsyncOperationCallback>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).BeginCommit)(
windows_core::Interface::as_raw(self),
timeoutmilliseconds,
callback.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub unsafe fn EndCommit<P0>(
&self,
context: P0,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>
where
P0: windows_core::Param<super::FabricCommon::IFabricAsyncOperationContext>,
{
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).EndCommit)(
windows_core::Interface::as_raw(self),
context.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub unsafe fn Rollback(&self) {
unsafe {
(windows_core::Interface::vtable(self).Rollback)(windows_core::Interface::as_raw(self));
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricTransaction_Vtbl {
pub base__: IFabricTransactionBase_Vtbl,
#[cfg(feature = "ServiceFabric_FabricCommon")]
pub BeginCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
u32,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
#[cfg(not(feature = "ServiceFabric_FabricCommon"))]
BeginCommit: usize,
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub EndCommit: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT,
#[cfg(not(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
)))]
EndCommit: usize,
pub Rollback: unsafe extern "system" fn(*mut core::ffi::c_void),
}
unsafe impl Send for IFabricTransaction {}
unsafe impl Sync for IFabricTransaction {}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
pub trait IFabricTransaction_Impl: IFabricTransactionBase_Impl {
fn BeginCommit(
&self,
timeoutmilliseconds: u32,
callback: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationCallback>,
) -> windows_core::Result<super::FabricCommon::IFabricAsyncOperationContext>;
fn EndCommit(
&self,
context: windows_core::Ref<super::FabricCommon::IFabricAsyncOperationContext>,
) -> windows_core::Result<super::FabricTypes::FABRIC_SEQUENCE_NUMBER>;
fn Rollback(&self);
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl IFabricTransaction_Vtbl {
pub const fn new<Identity: IFabricTransaction_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BeginCommit<
Identity: IFabricTransaction_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
timeoutmilliseconds: u32,
callback: *mut core::ffi::c_void,
context: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricTransaction_Impl::BeginCommit(
this,
core::mem::transmute_copy(&timeoutmilliseconds),
core::mem::transmute_copy(&callback),
) {
Ok(ok__) => {
context.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn EndCommit<
Identity: IFabricTransaction_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
commitsequencenumber: *mut super::FabricTypes::FABRIC_SEQUENCE_NUMBER,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricTransaction_Impl::EndCommit(this, core::mem::transmute_copy(&context))
{
Ok(ok__) => {
commitsequencenumber.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Rollback<
Identity: IFabricTransaction_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricTransaction_Impl::Rollback(this);
}
}
Self {
base__: IFabricTransactionBase_Vtbl::new::<Identity, OFFSET>(),
BeginCommit: BeginCommit::<Identity, OFFSET>,
EndCommit: EndCommit::<Identity, OFFSET>,
Rollback: Rollback::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricTransaction as windows_core::Interface>::IID
|| iid == &<IFabricTransactionBase as windows_core::Interface>::IID
}
}
#[cfg(all(
feature = "ServiceFabric_FabricCommon",
feature = "ServiceFabric_FabricTypes"
))]
impl windows_core::RuntimeName for IFabricTransaction {}
windows_core::imp::define_interface!(
IFabricTransactionBase,
IFabricTransactionBase_Vtbl,
0x32d656a1_7ad5_47b8_bd66_a2e302626b7e
);
windows_core::imp::interface_hierarchy!(IFabricTransactionBase, windows_core::IUnknown);
impl IFabricTransactionBase {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_Id(&self) -> *const super::FabricTypes::FABRIC_TRANSACTION_ID {
unsafe {
(windows_core::Interface::vtable(self).get_Id)(windows_core::Interface::as_raw(self))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_IsolationLevel(
&self,
) -> super::FabricTypes::FABRIC_TRANSACTION_ISOLATION_LEVEL {
unsafe {
(windows_core::Interface::vtable(self).get_IsolationLevel)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricTransactionBase_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_Id: unsafe extern "system" fn(
*mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_TRANSACTION_ID,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_Id: usize,
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub get_IsolationLevel:
unsafe extern "system" fn(
*mut core::ffi::c_void,
)
-> super::FabricTypes::FABRIC_TRANSACTION_ISOLATION_LEVEL,
#[cfg(not(feature = "ServiceFabric_FabricTypes"))]
get_IsolationLevel: usize,
}
unsafe impl Send for IFabricTransactionBase {}
unsafe impl Sync for IFabricTransactionBase {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricTransactionBase_Impl: windows_core::IUnknownImpl {
fn get_Id(&self) -> *const super::FabricTypes::FABRIC_TRANSACTION_ID;
fn get_IsolationLevel(&self) -> super::FabricTypes::FABRIC_TRANSACTION_ISOLATION_LEVEL;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricTransactionBase_Vtbl {
pub const fn new<Identity: IFabricTransactionBase_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_Id<
Identity: IFabricTransactionBase_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_TRANSACTION_ID {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricTransactionBase_Impl::get_Id(this)
}
}
unsafe extern "system" fn get_IsolationLevel<
Identity: IFabricTransactionBase_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> super::FabricTypes::FABRIC_TRANSACTION_ISOLATION_LEVEL {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricTransactionBase_Impl::get_IsolationLevel(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_Id: get_Id::<Identity, OFFSET>,
get_IsolationLevel: get_IsolationLevel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricTransactionBase as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricTransactionBase {}