| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloader(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloader { |
| type Vtable = IBackgroundDownloader_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloader { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xc1c79333_6649_4b1d_a826_a4b3dd234d0b); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloader_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub CreateDownload: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, resultfile: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Storage")))] |
| CreateDownload: usize, |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub CreateDownloadFromFile: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, resultfile: *mut ::core::ffi::c_void, requestbodyfile: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Storage")))] |
| CreateDownloadFromFile: usize, |
| #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] |
| pub CreateDownloadAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, resultfile: *mut ::core::ffi::c_void, requestbodystream: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))] |
| CreateDownloadAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloader2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloader2 { |
| type Vtable = IBackgroundDownloader2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloader2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa94a5847_348d_4a35_890e_8a1ef3798479); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloader2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub TransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| pub SetTransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(feature = "UI_Notifications")] |
| pub SuccessToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SuccessToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetSuccessToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetSuccessToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub FailureToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| FailureToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetFailureToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetFailureToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SuccessTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SuccessTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetSuccessTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetSuccessTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub FailureTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| FailureTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetFailureTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetFailureTileNotification: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloader3(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloader3 { |
| type Vtable = IBackgroundDownloader3_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloader3 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xd11a8c48_86e8_48e2_b615_6976aabf861d); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloader3_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CompletionGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloaderFactory(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloaderFactory { |
| type Vtable = IBackgroundDownloaderFactory_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloaderFactory { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x26836c24_d89e_46f4_a29a_4f4d4f144155); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloaderFactory_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CreateWithCompletionGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, completiongroup: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloaderStaticMethods(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloaderStaticMethods { |
| type Vtable = IBackgroundDownloaderStaticMethods_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloaderStaticMethods { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x52a65a35_c64e_426c_9919_540d0d21a650); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloaderStaticMethods_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub GetCurrentDownloadsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| GetCurrentDownloadsAsync: usize, |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub GetCurrentDownloadsForGroupAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, group: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation_Collections", feature = "deprecated")))] |
| GetCurrentDownloadsForGroupAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloaderStaticMethods2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundDownloaderStaticMethods2 { |
| type Vtable = IBackgroundDownloaderStaticMethods2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloaderStaticMethods2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2faa1327_1ad4_4ca5_b2cd_08dbf0746afe); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloaderStaticMethods2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub GetCurrentDownloadsForTransferGroupAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, group: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| GetCurrentDownloadsForTransferGroupAsync: usize, |
| } |
| #[doc(hidden)] |
| #[cfg(feature = "deprecated")] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundDownloaderUserConsent(::windows_core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::Interface for IBackgroundDownloaderUserConsent { |
| type Vtable = IBackgroundDownloaderUserConsent_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::ComInterface for IBackgroundDownloaderUserConsent { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x5d14e906_9266_4808_bd71_5925f2a3130a); |
| } |
| #[cfg(feature = "deprecated")] |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundDownloaderUserConsent_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub RequestUnconstrainedDownloadsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, operations: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation_Collections", feature = "deprecated")))] |
| RequestUnconstrainedDownloadsAsync: usize, |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferBase(::windows_core::IUnknown); |
| impl IBackgroundTransferBase { |
| pub fn SetRequestHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ServerCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ServerCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetServerCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetServerCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ProxyCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ProxyCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetProxyCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetProxyCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetMethod(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetMethod)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn SetGroup(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetGroup)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| } |
| ::windows_core::imp::interface_hierarchy!(IBackgroundTransferBase, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::RuntimeType for IBackgroundTransferBase { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"{2a9da250-c769-458c-afe8-feb8d4d3b2ef}"); |
| } |
| unsafe impl ::windows_core::Interface for IBackgroundTransferBase { |
| type Vtable = IBackgroundTransferBase_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferBase { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2a9da250_c769_458c_afe8_feb8d4d3b2ef); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferBase_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub SetRequestHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>, headervalue: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Security_Credentials")] |
| pub ServerCredential: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Security_Credentials"))] |
| ServerCredential: usize, |
| #[cfg(feature = "Security_Credentials")] |
| pub SetServerCredential: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, credential: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Security_Credentials"))] |
| SetServerCredential: usize, |
| #[cfg(feature = "Security_Credentials")] |
| pub ProxyCredential: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Security_Credentials"))] |
| ProxyCredential: usize, |
| #[cfg(feature = "Security_Credentials")] |
| pub SetProxyCredential: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, credential: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Security_Credentials"))] |
| SetProxyCredential: usize, |
| pub Method: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| pub SetMethod: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(feature = "deprecated")] |
| pub Group: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "deprecated"))] |
| Group: usize, |
| #[cfg(feature = "deprecated")] |
| pub SetGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "deprecated"))] |
| SetGroup: usize, |
| pub CostPolicy: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundTransferCostPolicy) -> ::windows_core::HRESULT, |
| pub SetCostPolicy: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: BackgroundTransferCostPolicy) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferCompletionGroup(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferCompletionGroup { |
| type Vtable = IBackgroundTransferCompletionGroup_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferCompletionGroup { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x2d930225_986b_574d_7950_0add47f5d706); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferCompletionGroup_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "ApplicationModel_Background")] |
| pub Trigger: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "ApplicationModel_Background"))] |
| Trigger: usize, |
| pub IsEnabled: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, |
| pub Enable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferCompletionGroupTriggerDetails(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferCompletionGroupTriggerDetails { |
| type Vtable = IBackgroundTransferCompletionGroupTriggerDetails_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferCompletionGroupTriggerDetails { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x7b6be286_6e47_5136_7fcb_fa4389f46f5b); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferCompletionGroupTriggerDetails_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub Downloads: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| Downloads: usize, |
| #[cfg(feature = "Foundation_Collections")] |
| pub Uploads: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| Uploads: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferContentPart(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferContentPart { |
| type Vtable = IBackgroundTransferContentPart_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferContentPart { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xe8e15657_d7d1_4ed8_838e_674ac217ace6); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferContentPart_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub SetHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>, headervalue: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| pub SetText: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Storage")] |
| pub SetFile: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Storage"))] |
| SetFile: usize, |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferContentPartFactory(::windows_core::IUnknown); |
| impl IBackgroundTransferContentPartFactory { |
| pub fn CreateWithName(&self, name: &::windows_core::HSTRING) -> ::windows_core::Result<BackgroundTransferContentPart> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CreateWithNameAndFileName(&self, name: &::windows_core::HSTRING, filename: &::windows_core::HSTRING) -> ::windows_core::Result<BackgroundTransferContentPart> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithNameAndFileName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(filename), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| ::windows_core::imp::interface_hierarchy!(IBackgroundTransferContentPartFactory, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::RuntimeType for IBackgroundTransferContentPartFactory { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"{90ef98a9-7a01-4a0b-9f80-a0b0bb370f8d}"); |
| } |
| unsafe impl ::windows_core::Interface for IBackgroundTransferContentPartFactory { |
| type Vtable = IBackgroundTransferContentPartFactory_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferContentPartFactory { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x90ef98a9_7a01_4a0b_9f80_a0b0bb370f8d); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferContentPartFactory_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CreateWithName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| pub CreateWithNameAndFileName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows_core::HSTRING>, filename: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferErrorStaticMethods(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferErrorStaticMethods { |
| type Vtable = IBackgroundTransferErrorStaticMethods_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferErrorStaticMethods { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xaad33b04_1192_4bf4_8b68_39c5add244e2); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferErrorStaticMethods_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Web")] |
| pub GetStatus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, hresult: i32, result__: *mut super::super::Web::WebErrorStatus) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Web"))] |
| GetStatus: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferGroup(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferGroup { |
| type Vtable = IBackgroundTransferGroup_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferGroup { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xd8c3e3e4_6459_4540_85eb_aaa1c8903677); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferGroup_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub Name: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| pub TransferBehavior: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundTransferBehavior) -> ::windows_core::HRESULT, |
| pub SetTransferBehavior: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: BackgroundTransferBehavior) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferGroupStatics(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferGroupStatics { |
| type Vtable = IBackgroundTransferGroupStatics_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferGroupStatics { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x02ec50b2_7d18_495b_aa22_32a97d45d3e2); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferGroupStatics_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CreateGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferOperation(::windows_core::IUnknown); |
| impl IBackgroundTransferOperation { |
| pub fn Guid(&self) -> ::windows_core::Result<::windows_core::GUID> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Guid)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn RequestedUri(&self) -> ::windows_core::Result<super::super::Foundation::Uri> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RequestedUri)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage_Streams\"`"] |
| #[cfg(feature = "Storage_Streams")] |
| pub fn GetResultStreamAt(&self, position: u64) -> ::windows_core::Result<super::super::Storage::Streams::IInputStream> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResultStreamAt)(::windows_core::Interface::as_raw(this), position, &mut result__).from_abi(result__) |
| } |
| } |
| pub fn GetResponseInformation(&self) -> ::windows_core::Result<ResponseInformation> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResponseInformation)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| ::windows_core::imp::interface_hierarchy!(IBackgroundTransferOperation, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::RuntimeType for IBackgroundTransferOperation { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"{ded06846-90ca-44fb-8fb1-124154c0d539}"); |
| } |
| unsafe impl ::windows_core::Interface for IBackgroundTransferOperation { |
| type Vtable = IBackgroundTransferOperation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferOperation { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xded06846_90ca_44fb_8fb1_124154c0d539); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferOperation_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub Guid: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::windows_core::GUID) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub RequestedUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RequestedUri: usize, |
| pub Method: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(feature = "deprecated")] |
| pub Group: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "deprecated"))] |
| Group: usize, |
| pub CostPolicy: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundTransferCostPolicy) -> ::windows_core::HRESULT, |
| pub SetCostPolicy: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: BackgroundTransferCostPolicy) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Storage_Streams")] |
| pub GetResultStreamAt: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, position: u64, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Storage_Streams"))] |
| GetResultStreamAt: usize, |
| pub GetResponseInformation: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferOperationPriority(::windows_core::IUnknown); |
| impl IBackgroundTransferOperationPriority { |
| pub fn Priority(&self) -> ::windows_core::Result<BackgroundTransferPriority> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Priority)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetPriority(&self, value: BackgroundTransferPriority) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetPriority)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| } |
| ::windows_core::imp::interface_hierarchy!(IBackgroundTransferOperationPriority, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::RuntimeType for IBackgroundTransferOperationPriority { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"{04854327-5254-4b3a-915e-0aa49275c0f9}"); |
| } |
| unsafe impl ::windows_core::Interface for IBackgroundTransferOperationPriority { |
| type Vtable = IBackgroundTransferOperationPriority_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferOperationPriority { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x04854327_5254_4b3a_915e_0aa49275c0f9); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferOperationPriority_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub Priority: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundTransferPriority) -> ::windows_core::HRESULT, |
| pub SetPriority: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: BackgroundTransferPriority) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundTransferRangesDownloadedEventArgs(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundTransferRangesDownloadedEventArgs { |
| type Vtable = IBackgroundTransferRangesDownloadedEventArgs_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundTransferRangesDownloadedEventArgs { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x3ebc7453_bf48_4a88_9248_b0c165184f5c); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundTransferRangesDownloadedEventArgs_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub WasDownloadRestarted: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation_Collections")] |
| pub AddedRanges: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| AddedRanges: usize, |
| #[cfg(feature = "Foundation")] |
| pub GetDeferral: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| GetDeferral: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploader(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploader { |
| type Vtable = IBackgroundUploader_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploader { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xc595c9ae_cead_465b_8801_c55ac90a01ce); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploader_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub CreateUpload: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, sourcefile: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Storage")))] |
| CreateUpload: usize, |
| #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] |
| pub CreateUploadFromStreamAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, sourcestream: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))] |
| CreateUploadFromStreamAsync: usize, |
| #[cfg(feature = "Foundation_Collections")] |
| pub CreateUploadWithFormDataAndAutoBoundaryAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, parts: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| CreateUploadWithFormDataAndAutoBoundaryAsync: usize, |
| #[cfg(feature = "Foundation_Collections")] |
| pub CreateUploadWithSubTypeAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, parts: *mut ::core::ffi::c_void, subtype: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| CreateUploadWithSubTypeAsync: usize, |
| #[cfg(feature = "Foundation_Collections")] |
| pub CreateUploadWithSubTypeAndBoundaryAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, uri: *mut ::core::ffi::c_void, parts: *mut ::core::ffi::c_void, subtype: ::std::mem::MaybeUninit<::windows_core::HSTRING>, boundary: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| CreateUploadWithSubTypeAndBoundaryAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploader2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploader2 { |
| type Vtable = IBackgroundUploader2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploader2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x8e0612ce_0c34_4463_807f_198a1b8bd4ad); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploader2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub TransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| pub SetTransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(feature = "UI_Notifications")] |
| pub SuccessToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SuccessToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetSuccessToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetSuccessToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub FailureToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| FailureToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetFailureToastNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetFailureToastNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SuccessTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SuccessTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetSuccessTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetSuccessTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub FailureTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| FailureTileNotification: usize, |
| #[cfg(feature = "UI_Notifications")] |
| pub SetFailureTileNotification: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "UI_Notifications"))] |
| SetFailureTileNotification: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploader3(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploader3 { |
| type Vtable = IBackgroundUploader3_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploader3 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xb95e9439_5bf0_4b3a_8c47_2c6199a854b9); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploader3_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CompletionGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploaderFactory(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploaderFactory { |
| type Vtable = IBackgroundUploaderFactory_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploaderFactory { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x736203c7_10e7_48a0_ac3c_1ac71095ec57); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploaderFactory_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub CreateWithCompletionGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, completiongroup: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploaderStaticMethods(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploaderStaticMethods { |
| type Vtable = IBackgroundUploaderStaticMethods_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploaderStaticMethods { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf2875cfb_9b05_4741_9121_740a83e247df); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploaderStaticMethods_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub GetCurrentUploadsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| GetCurrentUploadsAsync: usize, |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub GetCurrentUploadsForGroupAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, group: ::std::mem::MaybeUninit<::windows_core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation_Collections", feature = "deprecated")))] |
| GetCurrentUploadsForGroupAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploaderStaticMethods2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IBackgroundUploaderStaticMethods2 { |
| type Vtable = IBackgroundUploaderStaticMethods2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploaderStaticMethods2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xe919ac62_ea08_42f0_a2ac_07e467549080); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploaderStaticMethods2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub GetCurrentUploadsForTransferGroupAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, group: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| GetCurrentUploadsForTransferGroupAsync: usize, |
| } |
| #[doc(hidden)] |
| #[cfg(feature = "deprecated")] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IBackgroundUploaderUserConsent(::windows_core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::Interface for IBackgroundUploaderUserConsent { |
| type Vtable = IBackgroundUploaderUserConsent_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::ComInterface for IBackgroundUploaderUserConsent { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x3bb384cb_0760_461d_907f_5138f84d44c1); |
| } |
| #[cfg(feature = "deprecated")] |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IBackgroundUploaderUserConsent_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub RequestUnconstrainedUploadsAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, operations: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation_Collections", feature = "deprecated")))] |
| RequestUnconstrainedUploadsAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IContentPrefetcher(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IContentPrefetcher { |
| type Vtable = IContentPrefetcher_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IContentPrefetcher { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa8d6f754_7dc1_4cd9_8810_2a6aa9417e11); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IContentPrefetcher_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation_Collections")] |
| pub ContentUris: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| ContentUris: usize, |
| #[cfg(feature = "Foundation")] |
| pub SetIndirectContentUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| SetIndirectContentUri: usize, |
| #[cfg(feature = "Foundation")] |
| pub IndirectContentUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| IndirectContentUri: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IContentPrefetcherTime(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IContentPrefetcherTime { |
| type Vtable = IContentPrefetcherTime_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IContentPrefetcherTime { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xe361fd08_132a_4fde_a7cc_fcb0e66523af); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IContentPrefetcherTime_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Foundation")] |
| pub LastSuccessfulPrefetchTime: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| LastSuccessfulPrefetchTime: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IDownloadOperation(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IDownloadOperation { |
| type Vtable = IDownloadOperation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IDownloadOperation { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xbd87ebb0_5714_4e09_ba68_bef73903b0d7); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IDownloadOperation_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Storage")] |
| pub ResultFile: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Storage"))] |
| ResultFile: usize, |
| pub Progress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundDownloadProgress) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub StartAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| StartAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub AttachAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| AttachAsync: usize, |
| pub Pause: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| pub Resume: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IDownloadOperation2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IDownloadOperation2 { |
| type Vtable = IDownloadOperation2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IDownloadOperation2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa3cced40_8f9c_4353_9cd4_290dee387c38); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IDownloadOperation2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub TransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IDownloadOperation3(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IDownloadOperation3 { |
| type Vtable = IDownloadOperation3_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IDownloadOperation3 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x5027351c_7d5e_4adc_b8d3_df5c6031b9cc); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IDownloadOperation3_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub IsRandomAccessRequired: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, |
| pub SetIsRandomAccessRequired: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Storage_Streams")] |
| pub GetResultRandomAccessStreamReference: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Storage_Streams"))] |
| GetResultRandomAccessStreamReference: usize, |
| #[cfg(feature = "Foundation_Collections")] |
| pub GetDownloadedRanges: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| GetDownloadedRanges: usize, |
| #[cfg(feature = "Foundation")] |
| pub RangesDownloaded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, eventhandler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RangesDownloaded: usize, |
| #[cfg(feature = "Foundation")] |
| pub RemoveRangesDownloaded: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| RemoveRangesDownloaded: usize, |
| #[cfg(feature = "Foundation")] |
| pub SetRequestedUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| SetRequestedUri: usize, |
| #[cfg(all(feature = "Foundation_Collections", feature = "Web"))] |
| pub RecoverableWebErrorStatuses: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation_Collections", feature = "Web")))] |
| RecoverableWebErrorStatuses: usize, |
| #[cfg(all(feature = "Foundation", feature = "Web"))] |
| pub CurrentWebErrorStatus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(all(feature = "Foundation", feature = "Web")))] |
| CurrentWebErrorStatus: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IDownloadOperation4(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IDownloadOperation4 { |
| type Vtable = IDownloadOperation4_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IDownloadOperation4 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x0cdaaef4_8cef_404a_966d_f058400bed80); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IDownloadOperation4_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub MakeCurrentInTransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IDownloadOperation5(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IDownloadOperation5 { |
| type Vtable = IDownloadOperation5_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IDownloadOperation5 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xa699a86f_5590_463a_b8d6_1e491a2760a5); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IDownloadOperation5_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub SetRequestHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>, headervalue: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| pub RemoveRequestHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IResponseInformation(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IResponseInformation { |
| type Vtable = IResponseInformation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IResponseInformation { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0xf8bb9a12_f713_4792_8b68_d9d297f91d2e); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IResponseInformation_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub IsResumable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub ActualUri: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| ActualUri: usize, |
| pub StatusCode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation_Collections")] |
| pub Headers: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation_Collections"))] |
| Headers: usize, |
| } |
| #[doc(hidden)] |
| #[cfg(feature = "deprecated")] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IUnconstrainedTransferRequestResult(::windows_core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::Interface for IUnconstrainedTransferRequestResult { |
| type Vtable = IUnconstrainedTransferRequestResult_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::ComInterface for IUnconstrainedTransferRequestResult { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x4c24b81f_d944_4112_a98e_6a69522b7ebb); |
| } |
| #[cfg(feature = "deprecated")] |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IUnconstrainedTransferRequestResult_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "deprecated")] |
| pub IsUnconstrained: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "deprecated"))] |
| IsUnconstrained: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IUploadOperation(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IUploadOperation { |
| type Vtable = IUploadOperation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IUploadOperation { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x3e5624e0_7389_434c_8b35_427fd36bbdae); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IUploadOperation_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| #[cfg(feature = "Storage")] |
| pub SourceFile: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Storage"))] |
| SourceFile: usize, |
| pub Progress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BackgroundUploadProgress) -> ::windows_core::HRESULT, |
| #[cfg(feature = "Foundation")] |
| pub StartAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| StartAsync: usize, |
| #[cfg(feature = "Foundation")] |
| pub AttachAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| #[cfg(not(feature = "Foundation"))] |
| AttachAsync: usize, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IUploadOperation2(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IUploadOperation2 { |
| type Vtable = IUploadOperation2_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IUploadOperation2 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x556189f2_2774_4df6_9fa5_209f2bfb12f7); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IUploadOperation2_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub TransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IUploadOperation3(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IUploadOperation3 { |
| type Vtable = IUploadOperation3_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IUploadOperation3 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x42c92ca3_de39_4546_bc62_3774b4294de3); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IUploadOperation3_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub MakeCurrentInTransferGroup: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows_core::HRESULT, |
| } |
| #[doc(hidden)] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct IUploadOperation4(::windows_core::IUnknown); |
| unsafe impl ::windows_core::Interface for IUploadOperation4 { |
| type Vtable = IUploadOperation4_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for IUploadOperation4 { |
| const IID: ::windows_core::GUID = ::windows_core::GUID::from_u128(0x50edef31_fac5_41ee_b030_dc77caee9faa); |
| } |
| #[repr(C)] |
| #[doc(hidden)] |
| pub struct IUploadOperation4_Vtbl { |
| pub base__: ::windows_core::IInspectable_Vtbl, |
| pub SetRequestHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>, headervalue: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| pub RemoveRequestHeader: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, headername: ::std::mem::MaybeUninit<::windows_core::HSTRING>) -> ::windows_core::HRESULT, |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundDownloader(::windows_core::IUnknown); |
| impl BackgroundDownloader { |
| pub fn new() -> ::windows_core::Result<Self> { |
| Self::IActivationFactory(|f| f.ActivateInstance::<Self>()) |
| } |
| fn IActivationFactory<R, F: FnOnce(&::windows_core::imp::IGenericFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundDownloader, ::windows_core::imp::IGenericFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Storage\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub fn CreateDownload<P0, P1>(&self, uri: P0, resultfile: P1) -> ::windows_core::Result<DownloadOperation> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateDownload)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), resultfile.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Storage\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub fn CreateDownloadFromFile<P0, P1, P2>(&self, uri: P0, resultfile: P1, requestbodyfile: P2) -> ::windows_core::Result<DownloadOperation> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| P2: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateDownloadFromFile)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), resultfile.try_into_param()?.abi(), requestbodyfile.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Storage_Streams\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] |
| pub fn CreateDownloadAsync<P0, P1, P2>(&self, uri: P0, resultfile: P1, requestbodystream: P2) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<DownloadOperation>> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| P2: ::windows_core::TryIntoParam<super::super::Storage::Streams::IInputStream>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateDownloadAsync)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), resultfile.try_into_param()?.abi(), requestbodystream.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn TransferGroup(&self) -> ::windows_core::Result<BackgroundTransferGroup> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).TransferGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetTransferGroup<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferGroup>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetTransferGroup)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SuccessToastNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::ToastNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).SuccessToastNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetSuccessToastNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::ToastNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetSuccessToastNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn FailureToastNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::ToastNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).FailureToastNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetFailureToastNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::ToastNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetFailureToastNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SuccessTileNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::TileNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).SuccessTileNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetSuccessTileNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::TileNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetSuccessTileNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn FailureTileNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::TileNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).FailureTileNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetFailureTileNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::TileNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetFailureTileNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| pub fn CompletionGroup(&self) -> ::windows_core::Result<BackgroundTransferCompletionGroup> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundDownloader3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CompletionGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CreateWithCompletionGroup<P0>(completiongroup: P0) -> ::windows_core::Result<BackgroundDownloader> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferCompletionGroup>, |
| { |
| Self::IBackgroundDownloaderFactory(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithCompletionGroup)(::windows_core::Interface::as_raw(this), completiongroup.into_param().abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetCurrentDownloadsAsync() -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>> { |
| Self::IBackgroundDownloaderStaticMethods(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentDownloadsAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`, `\"deprecated\"`"] |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub fn GetCurrentDownloadsForGroupAsync(group: &::windows_core::HSTRING) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>> { |
| Self::IBackgroundDownloaderStaticMethods(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentDownloadsForGroupAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(group), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetCurrentDownloadsForTransferGroupAsync<P0>(group: P0) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferGroup>, |
| { |
| Self::IBackgroundDownloaderStaticMethods2(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentDownloadsForTransferGroupAsync)(::windows_core::Interface::as_raw(this), group.into_param().abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`, `\"deprecated\"`"] |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub fn RequestUnconstrainedDownloadsAsync<P0>(operations: P0) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UnconstrainedTransferRequestResult>> |
| where |
| P0: ::windows_core::TryIntoParam<super::super::Foundation::Collections::IIterable<DownloadOperation>>, |
| { |
| Self::IBackgroundDownloaderUserConsent(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RequestUnconstrainedDownloadsAsync)(::windows_core::Interface::as_raw(this), operations.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| pub fn SetRequestHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ServerCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ServerCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetServerCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetServerCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ProxyCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ProxyCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetProxyCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetProxyCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetMethod(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetMethod)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn SetGroup(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetGroup)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundDownloaderFactory<R, F: FnOnce(&IBackgroundDownloaderFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundDownloaderStaticMethods<R, F: FnOnce(&IBackgroundDownloaderStaticMethods) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderStaticMethods> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundDownloaderStaticMethods2<R, F: FnOnce(&IBackgroundDownloaderStaticMethods2) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderStaticMethods2> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| #[cfg(feature = "deprecated")] |
| pub fn IBackgroundDownloaderUserConsent<R, F: FnOnce(&IBackgroundDownloaderUserConsent) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderUserConsent> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundDownloader { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundDownloader;{c1c79333-6649-4b1d-a826-a4b3dd234d0b})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundDownloader { |
| type Vtable = IBackgroundDownloader_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundDownloader { |
| const IID: ::windows_core::GUID = <IBackgroundDownloader as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundDownloader { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundDownloader"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundDownloader, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::CanTryInto<IBackgroundTransferBase> for BackgroundDownloader {} |
| unsafe impl ::core::marker::Send for BackgroundDownloader {} |
| unsafe impl ::core::marker::Sync for BackgroundDownloader {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundTransferCompletionGroup(::windows_core::IUnknown); |
| impl BackgroundTransferCompletionGroup { |
| pub fn new() -> ::windows_core::Result<Self> { |
| Self::IActivationFactory(|f| f.ActivateInstance::<Self>()) |
| } |
| fn IActivationFactory<R, F: FnOnce(&::windows_core::imp::IGenericFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundTransferCompletionGroup, ::windows_core::imp::IGenericFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc = "Required features: `\"ApplicationModel_Background\"`"] |
| #[cfg(feature = "ApplicationModel_Background")] |
| pub fn Trigger(&self) -> ::windows_core::Result<super::super::ApplicationModel::Background::IBackgroundTrigger> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Trigger)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn IsEnabled(&self) -> ::windows_core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).IsEnabled)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Enable(&self) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).Enable)(::windows_core::Interface::as_raw(this)).ok() } |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferCompletionGroup { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup;{2d930225-986b-574d-7950-0add47f5d706})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundTransferCompletionGroup { |
| type Vtable = IBackgroundTransferCompletionGroup_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundTransferCompletionGroup { |
| const IID: ::windows_core::GUID = <IBackgroundTransferCompletionGroup as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferCompletionGroup { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundTransferCompletionGroup, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferCompletionGroup {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferCompletionGroup {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundTransferCompletionGroupTriggerDetails(::windows_core::IUnknown); |
| impl BackgroundTransferCompletionGroupTriggerDetails { |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Downloads(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IVectorView<DownloadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Downloads)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Uploads(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IVectorView<UploadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Uploads)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferCompletionGroupTriggerDetails { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroupTriggerDetails;{7b6be286-6e47-5136-7fcb-fa4389f46f5b})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundTransferCompletionGroupTriggerDetails { |
| type Vtable = IBackgroundTransferCompletionGroupTriggerDetails_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundTransferCompletionGroupTriggerDetails { |
| const IID: ::windows_core::GUID = <IBackgroundTransferCompletionGroupTriggerDetails as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferCompletionGroupTriggerDetails { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroupTriggerDetails"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundTransferCompletionGroupTriggerDetails, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferCompletionGroupTriggerDetails {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferCompletionGroupTriggerDetails {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundTransferContentPart(::windows_core::IUnknown); |
| impl BackgroundTransferContentPart { |
| pub fn new() -> ::windows_core::Result<Self> { |
| Self::IActivationFactory(|f| f.ActivateInstance::<Self>()) |
| } |
| fn IActivationFactory<R, F: FnOnce(&::windows_core::imp::IGenericFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundTransferContentPart, ::windows_core::imp::IGenericFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| pub fn SetHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| pub fn SetText(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetText)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| #[doc = "Required features: `\"Storage\"`"] |
| #[cfg(feature = "Storage")] |
| pub fn SetFile<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetFile)(::windows_core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() } |
| } |
| pub fn CreateWithName(name: &::windows_core::HSTRING) -> ::windows_core::Result<BackgroundTransferContentPart> { |
| Self::IBackgroundTransferContentPartFactory(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), &mut result__).from_abi(result__) |
| }) |
| } |
| pub fn CreateWithNameAndFileName(name: &::windows_core::HSTRING, filename: &::windows_core::HSTRING) -> ::windows_core::Result<BackgroundTransferContentPart> { |
| Self::IBackgroundTransferContentPartFactory(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithNameAndFileName)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(filename), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundTransferContentPartFactory<R, F: FnOnce(&IBackgroundTransferContentPartFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundTransferContentPart, IBackgroundTransferContentPartFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferContentPart { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart;{e8e15657-d7d1-4ed8-838e-674ac217ace6})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundTransferContentPart { |
| type Vtable = IBackgroundTransferContentPart_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundTransferContentPart { |
| const IID: ::windows_core::GUID = <IBackgroundTransferContentPart as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferContentPart { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundTransferContentPart, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferContentPart {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferContentPart {} |
| pub struct BackgroundTransferError; |
| impl BackgroundTransferError { |
| #[doc = "Required features: `\"Web\"`"] |
| #[cfg(feature = "Web")] |
| pub fn GetStatus(hresult: i32) -> ::windows_core::Result<super::super::Web::WebErrorStatus> { |
| Self::IBackgroundTransferErrorStaticMethods(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetStatus)(::windows_core::Interface::as_raw(this), hresult, &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundTransferErrorStaticMethods<R, F: FnOnce(&IBackgroundTransferErrorStaticMethods) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundTransferError, IBackgroundTransferErrorStaticMethods> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferError { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferError"; |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundTransferGroup(::windows_core::IUnknown); |
| impl BackgroundTransferGroup { |
| pub fn Name(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Name)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn TransferBehavior(&self) -> ::windows_core::Result<BackgroundTransferBehavior> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).TransferBehavior)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetTransferBehavior(&self, value: BackgroundTransferBehavior) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).SetTransferBehavior)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| pub fn CreateGroup(name: &::windows_core::HSTRING) -> ::windows_core::Result<BackgroundTransferGroup> { |
| Self::IBackgroundTransferGroupStatics(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateGroup)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundTransferGroupStatics<R, F: FnOnce(&IBackgroundTransferGroupStatics) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundTransferGroup, IBackgroundTransferGroupStatics> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferGroup { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup;{d8c3e3e4-6459-4540-85eb-aaa1c8903677})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundTransferGroup { |
| type Vtable = IBackgroundTransferGroup_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundTransferGroup { |
| const IID: ::windows_core::GUID = <IBackgroundTransferGroup as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferGroup { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferGroup"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundTransferGroup, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferGroup {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferGroup {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundTransferRangesDownloadedEventArgs(::windows_core::IUnknown); |
| impl BackgroundTransferRangesDownloadedEventArgs { |
| pub fn WasDownloadRestarted(&self) -> ::windows_core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).WasDownloadRestarted)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn AddedRanges(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IVector<BackgroundTransferFileRange>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).AddedRanges)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn GetDeferral(&self) -> ::windows_core::Result<super::super::Foundation::Deferral> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetDeferral)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferRangesDownloadedEventArgs { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs;{3ebc7453-bf48-4a88-9248-b0c165184f5c})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundTransferRangesDownloadedEventArgs { |
| type Vtable = IBackgroundTransferRangesDownloadedEventArgs_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundTransferRangesDownloadedEventArgs { |
| const IID: ::windows_core::GUID = <IBackgroundTransferRangesDownloadedEventArgs as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundTransferRangesDownloadedEventArgs { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundTransferRangesDownloadedEventArgs, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferRangesDownloadedEventArgs {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferRangesDownloadedEventArgs {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct BackgroundUploader(::windows_core::IUnknown); |
| impl BackgroundUploader { |
| pub fn new() -> ::windows_core::Result<Self> { |
| Self::IActivationFactory(|f| f.ActivateInstance::<Self>()) |
| } |
| fn IActivationFactory<R, F: FnOnce(&::windows_core::imp::IGenericFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundUploader, ::windows_core::imp::IGenericFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| pub fn SetRequestHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ServerCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ServerCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetServerCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetServerCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn ProxyCredential(&self) -> ::windows_core::Result<super::super::Security::Credentials::PasswordCredential> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ProxyCredential)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Security_Credentials\"`"] |
| #[cfg(feature = "Security_Credentials")] |
| pub fn SetProxyCredential<P0>(&self, credential: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Security::Credentials::PasswordCredential>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetProxyCredential)(::windows_core::Interface::as_raw(this), credential.into_param().abi()).ok() } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetMethod(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetMethod)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn SetGroup(&self, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetGroup)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Storage\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub fn CreateUpload<P0, P1>(&self, uri: P0, sourcefile: P1) -> ::windows_core::Result<UploadOperation> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateUpload)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), sourcefile.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Storage_Streams\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] |
| pub fn CreateUploadFromStreamAsync<P0, P1>(&self, uri: P0, sourcestream: P1) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Storage::Streams::IInputStream>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateUploadFromStreamAsync)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), sourcestream.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn CreateUploadWithFormDataAndAutoBoundaryAsync<P0, P1>(&self, uri: P0, parts: P1) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateUploadWithFormDataAndAutoBoundaryAsync)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), parts.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn CreateUploadWithSubTypeAsync<P0, P1>(&self, uri: P0, parts: P1, subtype: &::windows_core::HSTRING) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateUploadWithSubTypeAsync)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), parts.try_into_param()?.abi(), ::core::mem::transmute_copy(subtype), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn CreateUploadWithSubTypeAndBoundaryAsync<P0, P1>(&self, uri: P0, parts: P1, subtype: &::windows_core::HSTRING, boundary: &::windows_core::HSTRING) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| P1: ::windows_core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateUploadWithSubTypeAndBoundaryAsync)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), parts.try_into_param()?.abi(), ::core::mem::transmute_copy(subtype), ::core::mem::transmute_copy(boundary), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn TransferGroup(&self) -> ::windows_core::Result<BackgroundTransferGroup> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).TransferGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetTransferGroup<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferGroup>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetTransferGroup)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SuccessToastNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::ToastNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).SuccessToastNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetSuccessToastNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::ToastNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetSuccessToastNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn FailureToastNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::ToastNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).FailureToastNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetFailureToastNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::ToastNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetFailureToastNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SuccessTileNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::TileNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).SuccessTileNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetSuccessTileNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::TileNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetSuccessTileNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn FailureTileNotification(&self) -> ::windows_core::Result<super::super::UI::Notifications::TileNotification> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).FailureTileNotification)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"UI_Notifications\"`"] |
| #[cfg(feature = "UI_Notifications")] |
| pub fn SetFailureTileNotification<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::UI::Notifications::TileNotification>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetFailureTileNotification)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| pub fn CompletionGroup(&self) -> ::windows_core::Result<BackgroundTransferCompletionGroup> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundUploader3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CompletionGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CreateWithCompletionGroup<P0>(completiongroup: P0) -> ::windows_core::Result<BackgroundUploader> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferCompletionGroup>, |
| { |
| Self::IBackgroundUploaderFactory(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CreateWithCompletionGroup)(::windows_core::Interface::as_raw(this), completiongroup.into_param().abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetCurrentUploadsAsync() -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>> { |
| Self::IBackgroundUploaderStaticMethods(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentUploadsAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`, `\"deprecated\"`"] |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub fn GetCurrentUploadsForGroupAsync(group: &::windows_core::HSTRING) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>> { |
| Self::IBackgroundUploaderStaticMethods(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentUploadsForGroupAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(group), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetCurrentUploadsForTransferGroupAsync<P0>(group: P0) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>> |
| where |
| P0: ::windows_core::IntoParam<BackgroundTransferGroup>, |
| { |
| Self::IBackgroundUploaderStaticMethods2(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetCurrentUploadsForTransferGroupAsync)(::windows_core::Interface::as_raw(this), group.into_param().abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`, `\"deprecated\"`"] |
| #[cfg(all(feature = "Foundation_Collections", feature = "deprecated"))] |
| pub fn RequestUnconstrainedUploadsAsync<P0>(operations: P0) -> ::windows_core::Result<super::super::Foundation::IAsyncOperation<UnconstrainedTransferRequestResult>> |
| where |
| P0: ::windows_core::TryIntoParam<super::super::Foundation::Collections::IIterable<UploadOperation>>, |
| { |
| Self::IBackgroundUploaderUserConsent(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RequestUnconstrainedUploadsAsync)(::windows_core::Interface::as_raw(this), operations.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundUploaderFactory<R, F: FnOnce(&IBackgroundUploaderFactory) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderFactory> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundUploaderStaticMethods<R, F: FnOnce(&IBackgroundUploaderStaticMethods) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderStaticMethods> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IBackgroundUploaderStaticMethods2<R, F: FnOnce(&IBackgroundUploaderStaticMethods2) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderStaticMethods2> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| #[cfg(feature = "deprecated")] |
| pub fn IBackgroundUploaderUserConsent<R, F: FnOnce(&IBackgroundUploaderUserConsent) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderUserConsent> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundUploader { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundUploader;{c595c9ae-cead-465b-8801-c55ac90a01ce})"); |
| } |
| unsafe impl ::windows_core::Interface for BackgroundUploader { |
| type Vtable = IBackgroundUploader_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for BackgroundUploader { |
| const IID: ::windows_core::GUID = <IBackgroundUploader as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for BackgroundUploader { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundUploader"; |
| } |
| ::windows_core::imp::interface_hierarchy!(BackgroundUploader, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::CanTryInto<IBackgroundTransferBase> for BackgroundUploader {} |
| unsafe impl ::core::marker::Send for BackgroundUploader {} |
| unsafe impl ::core::marker::Sync for BackgroundUploader {} |
| pub struct ContentPrefetcher; |
| impl ContentPrefetcher { |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn ContentUris() -> ::windows_core::Result<super::super::Foundation::Collections::IVector<super::super::Foundation::Uri>> { |
| Self::IContentPrefetcher(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ContentUris)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn SetIndirectContentUri<P0>(value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| { |
| Self::IContentPrefetcher(|this| unsafe { (::windows_core::Interface::vtable(this).SetIndirectContentUri)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() }) |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn IndirectContentUri() -> ::windows_core::Result<super::super::Foundation::Uri> { |
| Self::IContentPrefetcher(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).IndirectContentUri)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn LastSuccessfulPrefetchTime() -> ::windows_core::Result<super::super::Foundation::IReference<super::super::Foundation::DateTime>> { |
| Self::IContentPrefetcherTime(|this| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).LastSuccessfulPrefetchTime)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| }) |
| } |
| #[doc(hidden)] |
| pub fn IContentPrefetcher<R, F: FnOnce(&IContentPrefetcher) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<ContentPrefetcher, IContentPrefetcher> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc(hidden)] |
| pub fn IContentPrefetcherTime<R, F: FnOnce(&IContentPrefetcherTime) -> ::windows_core::Result<R>>(callback: F) -> ::windows_core::Result<R> { |
| static SHARED: ::windows_core::imp::FactoryCache<ContentPrefetcher, IContentPrefetcherTime> = ::windows_core::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows_core::RuntimeName for ContentPrefetcher { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.ContentPrefetcher"; |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct DownloadOperation(::windows_core::IUnknown); |
| impl DownloadOperation { |
| pub fn Guid(&self) -> ::windows_core::Result<::windows_core::GUID> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Guid)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn RequestedUri(&self) -> ::windows_core::Result<super::super::Foundation::Uri> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RequestedUri)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage_Streams\"`"] |
| #[cfg(feature = "Storage_Streams")] |
| pub fn GetResultStreamAt(&self, position: u64) -> ::windows_core::Result<super::super::Storage::Streams::IInputStream> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResultStreamAt)(::windows_core::Interface::as_raw(this), position, &mut result__).from_abi(result__) |
| } |
| } |
| pub fn GetResponseInformation(&self) -> ::windows_core::Result<ResponseInformation> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResponseInformation)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Priority(&self) -> ::windows_core::Result<BackgroundTransferPriority> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperationPriority>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Priority)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetPriority(&self, value: BackgroundTransferPriority) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperationPriority>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetPriority)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage\"`"] |
| #[cfg(feature = "Storage")] |
| pub fn ResultFile(&self) -> ::windows_core::Result<super::super::Storage::IStorageFile> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ResultFile)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Progress(&self) -> ::windows_core::Result<BackgroundDownloadProgress> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Progress)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn StartAsync(&self) -> ::windows_core::Result<super::super::Foundation::IAsyncOperationWithProgress<DownloadOperation, DownloadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).StartAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn AttachAsync(&self) -> ::windows_core::Result<super::super::Foundation::IAsyncOperationWithProgress<DownloadOperation, DownloadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).AttachAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Pause(&self) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).Pause)(::windows_core::Interface::as_raw(this)).ok() } |
| } |
| pub fn Resume(&self) -> ::windows_core::Result<()> { |
| let this = self; |
| unsafe { (::windows_core::Interface::vtable(this).Resume)(::windows_core::Interface::as_raw(this)).ok() } |
| } |
| pub fn TransferGroup(&self) -> ::windows_core::Result<BackgroundTransferGroup> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).TransferGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn IsRandomAccessRequired(&self) -> ::windows_core::Result<bool> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).IsRandomAccessRequired)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetIsRandomAccessRequired(&self, value: bool) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetIsRandomAccessRequired)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage_Streams\"`"] |
| #[cfg(feature = "Storage_Streams")] |
| pub fn GetResultRandomAccessStreamReference(&self) -> ::windows_core::Result<super::super::Storage::Streams::IRandomAccessStreamReference> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResultRandomAccessStreamReference)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn GetDownloadedRanges(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IVector<BackgroundTransferFileRange>> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetDownloadedRanges)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn RangesDownloaded<P0>(&self, eventhandler: P0) -> ::windows_core::Result<super::super::Foundation::EventRegistrationToken> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::TypedEventHandler<DownloadOperation, BackgroundTransferRangesDownloadedEventArgs>>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RangesDownloaded)(::windows_core::Interface::as_raw(this), eventhandler.into_param().abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn RemoveRangesDownloaded(&self, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).RemoveRangesDownloaded)(::windows_core::Interface::as_raw(this), eventcookie).ok() } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn SetRequestedUri<P0>(&self, value: P0) -> ::windows_core::Result<()> |
| where |
| P0: ::windows_core::IntoParam<super::super::Foundation::Uri>, |
| { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestedUri)(::windows_core::Interface::as_raw(this), value.into_param().abi()).ok() } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`, `\"Web\"`"] |
| #[cfg(all(feature = "Foundation_Collections", feature = "Web"))] |
| pub fn RecoverableWebErrorStatuses(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IVector<super::super::Web::WebErrorStatus>> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RecoverableWebErrorStatuses)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`, `\"Web\"`"] |
| #[cfg(all(feature = "Foundation", feature = "Web"))] |
| pub fn CurrentWebErrorStatus(&self) -> ::windows_core::Result<super::super::Foundation::IReference<super::super::Web::WebErrorStatus>> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CurrentWebErrorStatus)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn MakeCurrentInTransferGroup(&self) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation4>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).MakeCurrentInTransferGroup)(::windows_core::Interface::as_raw(this)).ok() } |
| } |
| pub fn SetRequestHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation5>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| pub fn RemoveRequestHeader(&self, headername: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IDownloadOperation5>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).RemoveRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername)).ok() } |
| } |
| } |
| impl ::windows_core::RuntimeType for DownloadOperation { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.DownloadOperation;{bd87ebb0-5714-4e09-ba68-bef73903b0d7})"); |
| } |
| unsafe impl ::windows_core::Interface for DownloadOperation { |
| type Vtable = IDownloadOperation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for DownloadOperation { |
| const IID: ::windows_core::GUID = <IDownloadOperation as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for DownloadOperation { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.DownloadOperation"; |
| } |
| ::windows_core::imp::interface_hierarchy!(DownloadOperation, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::CanTryInto<IBackgroundTransferOperation> for DownloadOperation {} |
| impl ::windows_core::CanTryInto<IBackgroundTransferOperationPriority> for DownloadOperation {} |
| unsafe impl ::core::marker::Send for DownloadOperation {} |
| unsafe impl ::core::marker::Sync for DownloadOperation {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct ResponseInformation(::windows_core::IUnknown); |
| impl ResponseInformation { |
| pub fn IsResumable(&self) -> ::windows_core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).IsResumable)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn ActualUri(&self) -> ::windows_core::Result<super::super::Foundation::Uri> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).ActualUri)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn StatusCode(&self) -> ::windows_core::Result<u32> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).StatusCode)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation_Collections\"`"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn Headers(&self) -> ::windows_core::Result<super::super::Foundation::Collections::IMapView<::windows_core::HSTRING, ::windows_core::HSTRING>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Headers)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::windows_core::RuntimeType for ResponseInformation { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.ResponseInformation;{f8bb9a12-f713-4792-8b68-d9d297f91d2e})"); |
| } |
| unsafe impl ::windows_core::Interface for ResponseInformation { |
| type Vtable = IResponseInformation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for ResponseInformation { |
| const IID: ::windows_core::GUID = <IResponseInformation as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for ResponseInformation { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.ResponseInformation"; |
| } |
| ::windows_core::imp::interface_hierarchy!(ResponseInformation, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| unsafe impl ::core::marker::Send for ResponseInformation {} |
| unsafe impl ::core::marker::Sync for ResponseInformation {} |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct UnconstrainedTransferRequestResult(::windows_core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| impl UnconstrainedTransferRequestResult { |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn IsUnconstrained(&self) -> ::windows_core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).IsUnconstrained)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::windows_core::RuntimeType for UnconstrainedTransferRequestResult { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult;{4c24b81f-d944-4112-a98e-6a69522b7ebb})"); |
| } |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::Interface for UnconstrainedTransferRequestResult { |
| type Vtable = IUnconstrainedTransferRequestResult_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows_core::ComInterface for UnconstrainedTransferRequestResult { |
| const IID: ::windows_core::GUID = <IUnconstrainedTransferRequestResult as ::windows_core::ComInterface>::IID; |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::windows_core::RuntimeName for UnconstrainedTransferRequestResult { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult"; |
| } |
| #[cfg(feature = "deprecated")] |
| ::windows_core::imp::interface_hierarchy!(UnconstrainedTransferRequestResult, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::core::marker::Send for UnconstrainedTransferRequestResult {} |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::core::marker::Sync for UnconstrainedTransferRequestResult {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] |
| pub struct UploadOperation(::windows_core::IUnknown); |
| impl UploadOperation { |
| pub fn Guid(&self) -> ::windows_core::Result<::windows_core::GUID> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Guid)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn RequestedUri(&self) -> ::windows_core::Result<super::super::Foundation::Uri> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).RequestedUri)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Method(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Method)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"deprecated\"`"] |
| #[cfg(feature = "deprecated")] |
| pub fn Group(&self) -> ::windows_core::Result<::windows_core::HSTRING> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Group)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CostPolicy(&self) -> ::windows_core::Result<BackgroundTransferCostPolicy> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).CostPolicy)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetCostPolicy(&self, value: BackgroundTransferCostPolicy) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetCostPolicy)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage_Streams\"`"] |
| #[cfg(feature = "Storage_Streams")] |
| pub fn GetResultStreamAt(&self, position: u64) -> ::windows_core::Result<super::super::Storage::Streams::IInputStream> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResultStreamAt)(::windows_core::Interface::as_raw(this), position, &mut result__).from_abi(result__) |
| } |
| } |
| pub fn GetResponseInformation(&self) -> ::windows_core::Result<ResponseInformation> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperation>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).GetResponseInformation)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Priority(&self) -> ::windows_core::Result<BackgroundTransferPriority> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperationPriority>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Priority)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetPriority(&self, value: BackgroundTransferPriority) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IBackgroundTransferOperationPriority>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetPriority)(::windows_core::Interface::as_raw(this), value).ok() } |
| } |
| #[doc = "Required features: `\"Storage\"`"] |
| #[cfg(feature = "Storage")] |
| pub fn SourceFile(&self) -> ::windows_core::Result<super::super::Storage::IStorageFile> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).SourceFile)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn Progress(&self) -> ::windows_core::Result<BackgroundUploadProgress> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).Progress)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn StartAsync(&self) -> ::windows_core::Result<super::super::Foundation::IAsyncOperationWithProgress<UploadOperation, UploadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).StartAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "Required features: `\"Foundation\"`"] |
| #[cfg(feature = "Foundation")] |
| pub fn AttachAsync(&self) -> ::windows_core::Result<super::super::Foundation::IAsyncOperationWithProgress<UploadOperation, UploadOperation>> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).AttachAsync)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn TransferGroup(&self) -> ::windows_core::Result<BackgroundTransferGroup> { |
| let this = &::windows_core::ComInterface::cast::<IUploadOperation2>(self)?; |
| unsafe { |
| let mut result__ = ::std::mem::zeroed(); |
| (::windows_core::Interface::vtable(this).TransferGroup)(::windows_core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn MakeCurrentInTransferGroup(&self) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IUploadOperation3>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).MakeCurrentInTransferGroup)(::windows_core::Interface::as_raw(this)).ok() } |
| } |
| pub fn SetRequestHeader(&self, headername: &::windows_core::HSTRING, headervalue: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IUploadOperation4>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).SetRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername), ::core::mem::transmute_copy(headervalue)).ok() } |
| } |
| pub fn RemoveRequestHeader(&self, headername: &::windows_core::HSTRING) -> ::windows_core::Result<()> { |
| let this = &::windows_core::ComInterface::cast::<IUploadOperation4>(self)?; |
| unsafe { (::windows_core::Interface::vtable(this).RemoveRequestHeader)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(headername)).ok() } |
| } |
| } |
| impl ::windows_core::RuntimeType for UploadOperation { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.UploadOperation;{3e5624e0-7389-434c-8b35-427fd36bbdae})"); |
| } |
| unsafe impl ::windows_core::Interface for UploadOperation { |
| type Vtable = IUploadOperation_Vtbl; |
| } |
| unsafe impl ::windows_core::ComInterface for UploadOperation { |
| const IID: ::windows_core::GUID = <IUploadOperation as ::windows_core::ComInterface>::IID; |
| } |
| impl ::windows_core::RuntimeName for UploadOperation { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.UploadOperation"; |
| } |
| ::windows_core::imp::interface_hierarchy!(UploadOperation, ::windows_core::IUnknown, ::windows_core::IInspectable); |
| impl ::windows_core::CanTryInto<IBackgroundTransferOperation> for UploadOperation {} |
| impl ::windows_core::CanTryInto<IBackgroundTransferOperationPriority> for UploadOperation {} |
| unsafe impl ::core::marker::Send for UploadOperation {} |
| unsafe impl ::core::marker::Sync for UploadOperation {} |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct BackgroundTransferBehavior(pub i32); |
| impl BackgroundTransferBehavior { |
| pub const Parallel: Self = Self(0i32); |
| pub const Serialized: Self = Self(1i32); |
| } |
| impl ::core::marker::Copy for BackgroundTransferBehavior {} |
| impl ::core::clone::Clone for BackgroundTransferBehavior { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for BackgroundTransferBehavior { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundTransferBehavior { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::core::fmt::Debug for BackgroundTransferBehavior { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferBehavior").field(&self.0).finish() |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferBehavior { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferBehavior;i4)"); |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct BackgroundTransferCostPolicy(pub i32); |
| impl BackgroundTransferCostPolicy { |
| pub const Default: Self = Self(0i32); |
| pub const UnrestrictedOnly: Self = Self(1i32); |
| pub const Always: Self = Self(2i32); |
| } |
| impl ::core::marker::Copy for BackgroundTransferCostPolicy {} |
| impl ::core::clone::Clone for BackgroundTransferCostPolicy { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for BackgroundTransferCostPolicy { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundTransferCostPolicy { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::core::fmt::Debug for BackgroundTransferCostPolicy { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferCostPolicy").field(&self.0).finish() |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferCostPolicy { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy;i4)"); |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct BackgroundTransferPriority(pub i32); |
| impl BackgroundTransferPriority { |
| pub const Default: Self = Self(0i32); |
| pub const High: Self = Self(1i32); |
| pub const Low: Self = Self(2i32); |
| } |
| impl ::core::marker::Copy for BackgroundTransferPriority {} |
| impl ::core::clone::Clone for BackgroundTransferPriority { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for BackgroundTransferPriority { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundTransferPriority { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::core::fmt::Debug for BackgroundTransferPriority { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferPriority").field(&self.0).finish() |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferPriority { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferPriority;i4)"); |
| } |
| #[repr(transparent)] |
| #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] |
| pub struct BackgroundTransferStatus(pub i32); |
| impl BackgroundTransferStatus { |
| pub const Idle: Self = Self(0i32); |
| pub const Running: Self = Self(1i32); |
| pub const PausedByApplication: Self = Self(2i32); |
| pub const PausedCostedNetwork: Self = Self(3i32); |
| pub const PausedNoNetwork: Self = Self(4i32); |
| pub const Completed: Self = Self(5i32); |
| pub const Canceled: Self = Self(6i32); |
| pub const Error: Self = Self(7i32); |
| pub const PausedRecoverableWebErrorStatus: Self = Self(8i32); |
| pub const PausedSystemPolicy: Self = Self(32i32); |
| } |
| impl ::core::marker::Copy for BackgroundTransferStatus {} |
| impl ::core::clone::Clone for BackgroundTransferStatus { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::default::Default for BackgroundTransferStatus { |
| fn default() -> Self { |
| Self(0) |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundTransferStatus { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::core::fmt::Debug for BackgroundTransferStatus { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferStatus").field(&self.0).finish() |
| } |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferStatus { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferStatus;i4)"); |
| } |
| #[repr(C)] |
| pub struct BackgroundDownloadProgress { |
| pub BytesReceived: u64, |
| pub TotalBytesToReceive: u64, |
| pub Status: BackgroundTransferStatus, |
| pub HasResponseChanged: bool, |
| pub HasRestarted: bool, |
| } |
| impl ::core::marker::Copy for BackgroundDownloadProgress {} |
| impl ::core::clone::Clone for BackgroundDownloadProgress { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::fmt::Debug for BackgroundDownloadProgress { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_struct("BackgroundDownloadProgress").field("BytesReceived", &self.BytesReceived).field("TotalBytesToReceive", &self.TotalBytesToReceive).field("Status", &self.Status).field("HasResponseChanged", &self.HasResponseChanged).field("HasRestarted", &self.HasRestarted).finish() |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundDownloadProgress { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::windows_core::RuntimeType for BackgroundDownloadProgress { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Networking.BackgroundTransfer.BackgroundDownloadProgress;u8;u8;enum(Windows.Networking.BackgroundTransfer.BackgroundTransferStatus;i4);b1;b1)"); |
| } |
| impl ::core::cmp::PartialEq for BackgroundDownloadProgress { |
| fn eq(&self, other: &Self) -> bool { |
| self.BytesReceived == other.BytesReceived && self.TotalBytesToReceive == other.TotalBytesToReceive && self.Status == other.Status && self.HasResponseChanged == other.HasResponseChanged && self.HasRestarted == other.HasRestarted |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundDownloadProgress {} |
| impl ::core::default::Default for BackgroundDownloadProgress { |
| fn default() -> Self { |
| unsafe { ::core::mem::zeroed() } |
| } |
| } |
| #[repr(C)] |
| pub struct BackgroundTransferFileRange { |
| pub Offset: u64, |
| pub Length: u64, |
| } |
| impl ::core::marker::Copy for BackgroundTransferFileRange {} |
| impl ::core::clone::Clone for BackgroundTransferFileRange { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::fmt::Debug for BackgroundTransferFileRange { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_struct("BackgroundTransferFileRange").field("Offset", &self.Offset).field("Length", &self.Length).finish() |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundTransferFileRange { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::windows_core::RuntimeType for BackgroundTransferFileRange { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Networking.BackgroundTransfer.BackgroundTransferFileRange;u8;u8)"); |
| } |
| impl ::core::cmp::PartialEq for BackgroundTransferFileRange { |
| fn eq(&self, other: &Self) -> bool { |
| self.Offset == other.Offset && self.Length == other.Length |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferFileRange {} |
| impl ::core::default::Default for BackgroundTransferFileRange { |
| fn default() -> Self { |
| unsafe { ::core::mem::zeroed() } |
| } |
| } |
| #[repr(C)] |
| pub struct BackgroundUploadProgress { |
| pub BytesReceived: u64, |
| pub BytesSent: u64, |
| pub TotalBytesToReceive: u64, |
| pub TotalBytesToSend: u64, |
| pub Status: BackgroundTransferStatus, |
| pub HasResponseChanged: bool, |
| pub HasRestarted: bool, |
| } |
| impl ::core::marker::Copy for BackgroundUploadProgress {} |
| impl ::core::clone::Clone for BackgroundUploadProgress { |
| fn clone(&self) -> Self { |
| *self |
| } |
| } |
| impl ::core::fmt::Debug for BackgroundUploadProgress { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_struct("BackgroundUploadProgress").field("BytesReceived", &self.BytesReceived).field("BytesSent", &self.BytesSent).field("TotalBytesToReceive", &self.TotalBytesToReceive).field("TotalBytesToSend", &self.TotalBytesToSend).field("Status", &self.Status).field("HasResponseChanged", &self.HasResponseChanged).field("HasRestarted", &self.HasRestarted).finish() |
| } |
| } |
| impl ::windows_core::TypeKind for BackgroundUploadProgress { |
| type TypeKind = ::windows_core::CopyType; |
| } |
| impl ::windows_core::RuntimeType for BackgroundUploadProgress { |
| const SIGNATURE: ::windows_core::imp::ConstBuffer = ::windows_core::imp::ConstBuffer::from_slice(b"struct(Windows.Networking.BackgroundTransfer.BackgroundUploadProgress;u8;u8;u8;u8;enum(Windows.Networking.BackgroundTransfer.BackgroundTransferStatus;i4);b1;b1)"); |
| } |
| impl ::core::cmp::PartialEq for BackgroundUploadProgress { |
| fn eq(&self, other: &Self) -> bool { |
| self.BytesReceived == other.BytesReceived && self.BytesSent == other.BytesSent && self.TotalBytesToReceive == other.TotalBytesToReceive && self.TotalBytesToSend == other.TotalBytesToSend && self.Status == other.Status && self.HasResponseChanged == other.HasResponseChanged && self.HasRestarted == other.HasRestarted |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundUploadProgress {} |
| impl ::core::default::Default for BackgroundUploadProgress { |
| fn default() -> Self { |
| unsafe { ::core::mem::zeroed() } |
| } |
| } |
| #[cfg(feature = "implement")] |
| ::core::include!("impl.rs"); |