| #[doc(hidden)] |
| #[repr(transparent)] |
| pub struct IBackgroundDownloader(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloader { |
| type Vtable = IBackgroundDownloader_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloader { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloader2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloader2 { |
| type Vtable = IBackgroundDownloader2_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloader2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloader3(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloader3 { |
| type Vtable = IBackgroundDownloader3_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloader3 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloaderFactory(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloaderFactory { |
| type Vtable = IBackgroundDownloaderFactory_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloaderFactory { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloaderStaticMethods(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloaderStaticMethods { |
| type Vtable = IBackgroundDownloaderStaticMethods_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloaderStaticMethods { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloaderStaticMethods2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundDownloaderStaticMethods2 { |
| type Vtable = IBackgroundDownloaderStaticMethods2_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundDownloaderStaticMethods2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundDownloaderUserConsent(::windows::core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows::core::Interface for IBackgroundDownloaderUserConsent { |
| type Vtable = IBackgroundDownloaderUserConsent_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::clone::Clone for IBackgroundDownloaderUserConsent { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| #[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, |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Interface::vtable(this).SetServerCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = self; |
| unsafe { (::windows::core::Interface::vtable(this).SetProxyCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } |
| } |
| pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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::imp::interface_hierarchy!(IBackgroundTransferBase, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::cmp::PartialEq for IBackgroundTransferBase { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for IBackgroundTransferBase {} |
| impl ::core::fmt::Debug for IBackgroundTransferBase { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("IBackgroundTransferBase").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for IBackgroundTransferBase { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{2a9da250-c769-458c-afe8-feb8d4d3b2ef}"); |
| } |
| unsafe impl ::windows::core::Interface for IBackgroundTransferBase { |
| type Vtable = IBackgroundTransferBase_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferBase { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferCompletionGroup(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferCompletionGroup { |
| type Vtable = IBackgroundTransferCompletionGroup_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferCompletionGroup { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferCompletionGroupTriggerDetails(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferCompletionGroupTriggerDetails { |
| type Vtable = IBackgroundTransferCompletionGroupTriggerDetails_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferCompletionGroupTriggerDetails { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferContentPart(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferContentPart { |
| type Vtable = IBackgroundTransferContentPart_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferContentPart { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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, |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<BackgroundTransferContentPart>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferContentPart>(); |
| (::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::imp::interface_hierarchy!(IBackgroundTransferContentPartFactory, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::cmp::PartialEq for IBackgroundTransferContentPartFactory { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for IBackgroundTransferContentPartFactory {} |
| impl ::core::fmt::Debug for IBackgroundTransferContentPartFactory { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("IBackgroundTransferContentPartFactory").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for IBackgroundTransferContentPartFactory { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{90ef98a9-7a01-4a0b-9f80-a0b0bb370f8d}"); |
| } |
| unsafe impl ::windows::core::Interface for IBackgroundTransferContentPartFactory { |
| type Vtable = IBackgroundTransferContentPartFactory_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferContentPartFactory { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferErrorStaticMethods(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferErrorStaticMethods { |
| type Vtable = IBackgroundTransferErrorStaticMethods_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferErrorStaticMethods { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferGroup(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferGroup { |
| type Vtable = IBackgroundTransferGroup_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferGroup { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferGroupStatics(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferGroupStatics { |
| type Vtable = IBackgroundTransferGroupStatics_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferGroupStatics { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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, |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<::windows::core::GUID>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Uri>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::Streams::IInputStream>(); |
| (::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__ = ::windows::core::zeroed::<ResponseInformation>(); |
| (::windows::core::Interface::vtable(this).GetResponseInformation)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| ::windows::imp::interface_hierarchy!(IBackgroundTransferOperation, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::cmp::PartialEq for IBackgroundTransferOperation { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for IBackgroundTransferOperation {} |
| impl ::core::fmt::Debug for IBackgroundTransferOperation { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("IBackgroundTransferOperation").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for IBackgroundTransferOperation { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{ded06846-90ca-44fb-8fb1-124154c0d539}"); |
| } |
| unsafe impl ::windows::core::Interface for IBackgroundTransferOperation { |
| type Vtable = IBackgroundTransferOperation_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferOperation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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, |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| pub struct IBackgroundTransferOperationPriority(::windows::core::IUnknown); |
| impl IBackgroundTransferOperationPriority { |
| pub fn Priority(&self) -> ::windows::core::Result<BackgroundTransferPriority> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<BackgroundTransferPriority>(); |
| (::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::imp::interface_hierarchy!(IBackgroundTransferOperationPriority, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| impl ::core::cmp::PartialEq for IBackgroundTransferOperationPriority { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for IBackgroundTransferOperationPriority {} |
| impl ::core::fmt::Debug for IBackgroundTransferOperationPriority { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("IBackgroundTransferOperationPriority").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for IBackgroundTransferOperationPriority { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"{04854327-5254-4b3a-915e-0aa49275c0f9}"); |
| } |
| unsafe impl ::windows::core::Interface for IBackgroundTransferOperationPriority { |
| type Vtable = IBackgroundTransferOperationPriority_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferOperationPriority { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundTransferRangesDownloadedEventArgs(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundTransferRangesDownloadedEventArgs { |
| type Vtable = IBackgroundTransferRangesDownloadedEventArgs_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundTransferRangesDownloadedEventArgs { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploader(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploader { |
| type Vtable = IBackgroundUploader_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploader { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploader2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploader2 { |
| type Vtable = IBackgroundUploader2_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploader2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploader3(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploader3 { |
| type Vtable = IBackgroundUploader3_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploader3 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploaderFactory(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploaderFactory { |
| type Vtable = IBackgroundUploaderFactory_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploaderFactory { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploaderStaticMethods(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploaderStaticMethods { |
| type Vtable = IBackgroundUploaderStaticMethods_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploaderStaticMethods { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploaderStaticMethods2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IBackgroundUploaderStaticMethods2 { |
| type Vtable = IBackgroundUploaderStaticMethods2_Vtbl; |
| } |
| impl ::core::clone::Clone for IBackgroundUploaderStaticMethods2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IBackgroundUploaderUserConsent(::windows::core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows::core::Interface for IBackgroundUploaderUserConsent { |
| type Vtable = IBackgroundUploaderUserConsent_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::clone::Clone for IBackgroundUploaderUserConsent { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| #[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)] |
| pub struct IContentPrefetcher(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IContentPrefetcher { |
| type Vtable = IContentPrefetcher_Vtbl; |
| } |
| impl ::core::clone::Clone for IContentPrefetcher { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IContentPrefetcherTime(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IContentPrefetcherTime { |
| type Vtable = IContentPrefetcherTime_Vtbl; |
| } |
| impl ::core::clone::Clone for IContentPrefetcherTime { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IDownloadOperation(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IDownloadOperation { |
| type Vtable = IDownloadOperation_Vtbl; |
| } |
| impl ::core::clone::Clone for IDownloadOperation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IDownloadOperation2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IDownloadOperation2 { |
| type Vtable = IDownloadOperation2_Vtbl; |
| } |
| impl ::core::clone::Clone for IDownloadOperation2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IDownloadOperation3(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IDownloadOperation3 { |
| type Vtable = IDownloadOperation3_Vtbl; |
| } |
| impl ::core::clone::Clone for IDownloadOperation3 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IDownloadOperation4(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IDownloadOperation4 { |
| type Vtable = IDownloadOperation4_Vtbl; |
| } |
| impl ::core::clone::Clone for IDownloadOperation4 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IDownloadOperation5(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IDownloadOperation5 { |
| type Vtable = IDownloadOperation5_Vtbl; |
| } |
| impl ::core::clone::Clone for IDownloadOperation5 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IResponseInformation(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IResponseInformation { |
| type Vtable = IResponseInformation_Vtbl; |
| } |
| impl ::core::clone::Clone for IResponseInformation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IUnconstrainedTransferRequestResult(::windows::core::IUnknown); |
| #[cfg(feature = "deprecated")] |
| unsafe impl ::windows::core::Interface for IUnconstrainedTransferRequestResult { |
| type Vtable = IUnconstrainedTransferRequestResult_Vtbl; |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::clone::Clone for IUnconstrainedTransferRequestResult { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| #[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)] |
| pub struct IUploadOperation(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IUploadOperation { |
| type Vtable = IUploadOperation_Vtbl; |
| } |
| impl ::core::clone::Clone for IUploadOperation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IUploadOperation2(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IUploadOperation2 { |
| type Vtable = IUploadOperation2_Vtbl; |
| } |
| impl ::core::clone::Clone for IUploadOperation2 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IUploadOperation3(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IUploadOperation3 { |
| type Vtable = IUploadOperation3_Vtbl; |
| } |
| impl ::core::clone::Clone for IUploadOperation3 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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)] |
| pub struct IUploadOperation4(::windows::core::IUnknown); |
| unsafe impl ::windows::core::Interface for IUploadOperation4 { |
| type Vtable = IUploadOperation4_Vtbl; |
| } |
| impl ::core::clone::Clone for IUploadOperation4 { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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, |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::imp::FactoryCache<BackgroundDownloader, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"] |
| #[cfg(all(feature = "Foundation", feature = "Storage"))] |
| pub fn CreateDownload<P0>(&self, uri: &super::super::Foundation::Uri, resultfile: P0) -> ::windows::core::Result<DownloadOperation> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<DownloadOperation>(); |
| (::windows::core::Interface::vtable(this).CreateDownload)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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>(&self, uri: &super::super::Foundation::Uri, resultfile: P0, requestbodyfile: P1) -> ::windows::core::Result<DownloadOperation> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageFile>, |
| P1: ::windows::core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<DownloadOperation>(); |
| (::windows::core::Interface::vtable(this).CreateDownloadFromFile)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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>(&self, uri: &super::super::Foundation::Uri, resultfile: P0, requestbodystream: P1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<DownloadOperation>> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageFile>, |
| P1: ::windows::core::TryIntoParam<super::super::Storage::Streams::IInputStream>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<DownloadOperation>>(); |
| (::windows::core::Interface::vtable(this).CreateDownloadAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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__ = ::windows::core::zeroed::<BackgroundTransferGroup>(); |
| (::windows::core::Interface::vtable(this).TransferGroup)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetTransferGroup(&self, value: &BackgroundTransferGroup) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetTransferGroup)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::ToastNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetSuccessToastNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::ToastNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetFailureToastNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::TileNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetSuccessTileNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::TileNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetFailureTileNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| pub fn CompletionGroup(&self) -> ::windows::core::Result<BackgroundTransferCompletionGroup> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundDownloader3>(self)?; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<BackgroundTransferCompletionGroup>(); |
| (::windows::core::Interface::vtable(this).CompletionGroup)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CreateWithCompletionGroup(completiongroup: &BackgroundTransferCompletionGroup) -> ::windows::core::Result<BackgroundDownloader> { |
| Self::IBackgroundDownloaderFactory(|this| unsafe { |
| let mut result__ = ::windows::core::zeroed::<BackgroundDownloader>(); |
| (::windows::core::Interface::vtable(this).CreateWithCompletionGroup)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(completiongroup), &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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>>(); |
| (::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(group: &BackgroundTransferGroup) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>> { |
| Self::IBackgroundDownloaderStaticMethods2(|this| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<DownloadOperation>>>(); |
| (::windows::core::Interface::vtable(this).GetCurrentDownloadsForTransferGroupAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(group), &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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UnconstrainedTransferRequestResult>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetServerCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetProxyCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } |
| } |
| pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderFactory> = ::windows::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::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderStaticMethods> = ::windows::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::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderStaticMethods2> = ::windows::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::imp::FactoryCache<BackgroundDownloader, IBackgroundDownloaderUserConsent> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundDownloader { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundDownloader {} |
| impl ::core::fmt::Debug for BackgroundDownloader { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundDownloader").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundDownloader { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundDownloader;{c1c79333-6649-4b1d-a826-a4b3dd234d0b})"); |
| } |
| impl ::core::clone::Clone for BackgroundDownloader { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::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 {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::imp::FactoryCache<BackgroundTransferCompletionGroup, ::windows::imp::IGenericFactory> = ::windows::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__ = ::windows::core::zeroed::<super::super::ApplicationModel::Background::IBackgroundTrigger>(); |
| (::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__ = ::windows::core::zeroed::<bool>(); |
| (::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 ::core::cmp::PartialEq for BackgroundTransferCompletionGroup { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferCompletionGroup {} |
| impl ::core::fmt::Debug for BackgroundTransferCompletionGroup { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferCompletionGroup").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundTransferCompletionGroup { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroup;{2d930225-986b-574d-7950-0add47f5d706})"); |
| } |
| impl ::core::clone::Clone for BackgroundTransferCompletionGroup { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::imp::interface_hierarchy!(BackgroundTransferCompletionGroup, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferCompletionGroup {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferCompletionGroup {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<DownloadOperation>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVectorView<UploadOperation>>(); |
| (::windows::core::Interface::vtable(this).Uploads)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundTransferCompletionGroupTriggerDetails { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferCompletionGroupTriggerDetails {} |
| impl ::core::fmt::Debug for BackgroundTransferCompletionGroupTriggerDetails { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferCompletionGroupTriggerDetails").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundTransferCompletionGroupTriggerDetails { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferCompletionGroupTriggerDetails;{7b6be286-6e47-5136-7fcb-fa4389f46f5b})"); |
| } |
| impl ::core::clone::Clone for BackgroundTransferCompletionGroupTriggerDetails { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::imp::interface_hierarchy!(BackgroundTransferCompletionGroupTriggerDetails, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferCompletionGroupTriggerDetails {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferCompletionGroupTriggerDetails {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::imp::FactoryCache<BackgroundTransferContentPart, ::windows::imp::IGenericFactory> = ::windows::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__ = ::windows::core::zeroed::<BackgroundTransferContentPart>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferContentPart>(); |
| (::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::imp::FactoryCache<BackgroundTransferContentPart, IBackgroundTransferContentPartFactory> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundTransferContentPart { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferContentPart {} |
| impl ::core::fmt::Debug for BackgroundTransferContentPart { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferContentPart").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundTransferContentPart { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart;{e8e15657-d7d1-4ed8-838e-674ac217ace6})"); |
| } |
| impl ::core::clone::Clone for BackgroundTransferContentPart { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::imp::interface_hierarchy!(BackgroundTransferContentPart, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferContentPart {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferContentPart {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| 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__ = ::windows::core::zeroed::<super::super::Web::WebErrorStatus>(); |
| (::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::imp::FactoryCache<BackgroundTransferError, IBackgroundTransferErrorStaticMethods> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows::core::RuntimeName for BackgroundTransferError { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.BackgroundTransferError"; |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferBehavior>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferGroup>(); |
| (::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::imp::FactoryCache<BackgroundTransferGroup, IBackgroundTransferGroupStatics> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundTransferGroup { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferGroup {} |
| impl ::core::fmt::Debug for BackgroundTransferGroup { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferGroup").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundTransferGroup { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferGroup;{d8c3e3e4-6459-4540-85eb-aaa1c8903677})"); |
| } |
| impl ::core::clone::Clone for BackgroundTransferGroup { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::imp::interface_hierarchy!(BackgroundTransferGroup, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferGroup {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferGroup {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| pub struct BackgroundTransferRangesDownloadedEventArgs(::windows::core::IUnknown); |
| impl BackgroundTransferRangesDownloadedEventArgs { |
| pub fn WasDownloadRestarted(&self) -> ::windows::core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<bool>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVector<BackgroundTransferFileRange>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Deferral>(); |
| (::windows::core::Interface::vtable(this).GetDeferral)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundTransferRangesDownloadedEventArgs { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundTransferRangesDownloadedEventArgs {} |
| impl ::core::fmt::Debug for BackgroundTransferRangesDownloadedEventArgs { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundTransferRangesDownloadedEventArgs").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundTransferRangesDownloadedEventArgs { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundTransferRangesDownloadedEventArgs;{3ebc7453-bf48-4a88-9248-b0c165184f5c})"); |
| } |
| impl ::core::clone::Clone for BackgroundTransferRangesDownloadedEventArgs { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::imp::interface_hierarchy!(BackgroundTransferRangesDownloadedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable); |
| unsafe impl ::core::marker::Send for BackgroundTransferRangesDownloadedEventArgs {} |
| unsafe impl ::core::marker::Sync for BackgroundTransferRangesDownloadedEventArgs {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { |
| static SHARED: ::windows::imp::FactoryCache<BackgroundUploader, ::windows::imp::IGenericFactory> = ::windows::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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetServerCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).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__ = ::windows::core::zeroed::<super::super::Security::Credentials::PasswordCredential>(); |
| (::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(&self, credential: &super::super::Security::Credentials::PasswordCredential) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetProxyCredential)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(credential)).ok() } |
| } |
| pub fn Method(&self) -> ::windows::core::Result<::windows::core::HSTRING> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundTransferBase>(self)?; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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>(&self, uri: &super::super::Foundation::Uri, sourcefile: P0) -> ::windows::core::Result<UploadOperation> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageFile>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<UploadOperation>(); |
| (::windows::core::Interface::vtable(this).CreateUpload)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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>(&self, uri: &super::super::Foundation::Uri, sourcestream: P0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Storage::Streams::IInputStream>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UploadOperation>>(); |
| (::windows::core::Interface::vtable(this).CreateUploadFromStreamAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), sourcestream.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn CreateUploadWithFormDataAndAutoBoundaryAsync<P0>(&self, uri: &super::super::Foundation::Uri, parts: P0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UploadOperation>>(); |
| (::windows::core::Interface::vtable(this).CreateUploadWithFormDataAndAutoBoundaryAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), parts.try_into_param()?.abi(), &mut result__).from_abi(result__) |
| } |
| } |
| #[doc = "*Required features: `\"Foundation_Collections\"`*"] |
| #[cfg(feature = "Foundation_Collections")] |
| pub fn CreateUploadWithSubTypeAsync<P0>(&self, uri: &super::super::Foundation::Uri, parts: P0, subtype: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UploadOperation>>(); |
| (::windows::core::Interface::vtable(this).CreateUploadWithSubTypeAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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>(&self, uri: &super::super::Foundation::Uri, parts: P0, subtype: &::windows::core::HSTRING, boundary: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UploadOperation>> |
| where |
| P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<BackgroundTransferContentPart>>, |
| { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UploadOperation>>(); |
| (::windows::core::Interface::vtable(this).CreateUploadWithSubTypeAndBoundaryAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(uri), 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__ = ::windows::core::zeroed::<BackgroundTransferGroup>(); |
| (::windows::core::Interface::vtable(this).TransferGroup)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn SetTransferGroup(&self, value: &BackgroundTransferGroup) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetTransferGroup)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::ToastNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetSuccessToastNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::ToastNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::ToastNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetFailureToastNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::TileNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetSuccessTileNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::UI::Notifications::TileNotification>(); |
| (::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(&self, value: &super::super::UI::Notifications::TileNotification) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader2>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetFailureTileNotification)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() } |
| } |
| pub fn CompletionGroup(&self) -> ::windows::core::Result<BackgroundTransferCompletionGroup> { |
| let this = &::windows::core::ComInterface::cast::<IBackgroundUploader3>(self)?; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<BackgroundTransferCompletionGroup>(); |
| (::windows::core::Interface::vtable(this).CompletionGroup)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| pub fn CreateWithCompletionGroup(completiongroup: &BackgroundTransferCompletionGroup) -> ::windows::core::Result<BackgroundUploader> { |
| Self::IBackgroundUploaderFactory(|this| unsafe { |
| let mut result__ = ::windows::core::zeroed::<BackgroundUploader>(); |
| (::windows::core::Interface::vtable(this).CreateWithCompletionGroup)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(completiongroup), &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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>>(); |
| (::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(group: &BackgroundTransferGroup) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>> { |
| Self::IBackgroundUploaderStaticMethods2(|this| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<UploadOperation>>>(); |
| (::windows::core::Interface::vtable(this).GetCurrentUploadsForTransferGroupAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(group), &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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UnconstrainedTransferRequestResult>>(); |
| (::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::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderFactory> = ::windows::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::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderStaticMethods> = ::windows::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::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderStaticMethods2> = ::windows::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::imp::FactoryCache<BackgroundUploader, IBackgroundUploaderUserConsent> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::core::cmp::PartialEq for BackgroundUploader { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for BackgroundUploader {} |
| impl ::core::fmt::Debug for BackgroundUploader { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("BackgroundUploader").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for BackgroundUploader { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.BackgroundUploader;{c595c9ae-cead-465b-8801-c55ac90a01ce})"); |
| } |
| impl ::core::clone::Clone for BackgroundUploader { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::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 {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| 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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVector<super::super::Foundation::Uri>>(); |
| (::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(value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { |
| Self::IContentPrefetcher(|this| unsafe { (::windows::core::Interface::vtable(this).SetIndirectContentUri)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::Foundation::Uri>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IReference<super::super::Foundation::DateTime>>(); |
| (::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::imp::FactoryCache<ContentPrefetcher, IContentPrefetcher> = ::windows::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::imp::FactoryCache<ContentPrefetcher, IContentPrefetcherTime> = ::windows::imp::FactoryCache::new(); |
| SHARED.call(callback) |
| } |
| } |
| impl ::windows::core::RuntimeName for ContentPrefetcher { |
| const NAME: &'static str = "Windows.Networking.BackgroundTransfer.ContentPrefetcher"; |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<::windows::core::GUID>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Uri>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::Streams::IInputStream>(); |
| (::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__ = ::windows::core::zeroed::<ResponseInformation>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferPriority>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::IStorageFile>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundDownloadProgress>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperationWithProgress<DownloadOperation, DownloadOperation>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperationWithProgress<DownloadOperation, DownloadOperation>>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferGroup>(); |
| (::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__ = ::windows::core::zeroed::<bool>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::Streams::IRandomAccessStreamReference>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVector<BackgroundTransferFileRange>>(); |
| (::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(&self, eventhandler: &super::super::Foundation::TypedEventHandler<DownloadOperation, BackgroundTransferRangesDownloadedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> { |
| let this = &::windows::core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>(); |
| (::windows::core::Interface::vtable(this).RangesDownloaded)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(eventhandler), &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(&self, value: &super::super::Foundation::Uri) -> ::windows::core::Result<()> { |
| let this = &::windows::core::ComInterface::cast::<IDownloadOperation3>(self)?; |
| unsafe { (::windows::core::Interface::vtable(this).SetRequestedUri)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IVector<super::super::Web::WebErrorStatus>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IReference<super::super::Web::WebErrorStatus>>(); |
| (::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 ::core::cmp::PartialEq for DownloadOperation { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for DownloadOperation {} |
| impl ::core::fmt::Debug for DownloadOperation { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("DownloadOperation").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for DownloadOperation { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.DownloadOperation;{bd87ebb0-5714-4e09-ba68-bef73903b0d7})"); |
| } |
| impl ::core::clone::Clone for DownloadOperation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::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 {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| pub struct ResponseInformation(::windows::core::IUnknown); |
| impl ResponseInformation { |
| pub fn IsResumable(&self) -> ::windows::core::Result<bool> { |
| let this = self; |
| unsafe { |
| let mut result__ = ::windows::core::zeroed::<bool>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Uri>(); |
| (::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__ = ::windows::core::zeroed::<u32>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Collections::IMapView<::windows::core::HSTRING, ::windows::core::HSTRING>>(); |
| (::windows::core::Interface::vtable(this).Headers)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| impl ::core::cmp::PartialEq for ResponseInformation { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for ResponseInformation {} |
| impl ::core::fmt::Debug for ResponseInformation { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("ResponseInformation").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for ResponseInformation { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.ResponseInformation;{f8bb9a12-f713-4792-8b68-d9d297f91d2e})"); |
| } |
| impl ::core::clone::Clone for ResponseInformation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::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: `\"Networking_BackgroundTransfer\"`, `\"deprecated\"`*"] |
| #[cfg(feature = "deprecated")] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<bool>(); |
| (::windows::core::Interface::vtable(this).IsUnconstrained)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) |
| } |
| } |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::cmp::PartialEq for UnconstrainedTransferRequestResult { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::cmp::Eq for UnconstrainedTransferRequestResult {} |
| #[cfg(feature = "deprecated")] |
| impl ::core::fmt::Debug for UnconstrainedTransferRequestResult { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("UnconstrainedTransferRequestResult").field(&self.0).finish() |
| } |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::windows::core::RuntimeType for UnconstrainedTransferRequestResult { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.UnconstrainedTransferRequestResult;{4c24b81f-d944-4112-a98e-6a69522b7ebb})"); |
| } |
| #[cfg(feature = "deprecated")] |
| impl ::core::clone::Clone for UnconstrainedTransferRequestResult { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| #[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::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 {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[repr(transparent)] |
| 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__ = ::windows::core::zeroed::<::windows::core::GUID>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::Uri>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferCostPolicy>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::Streams::IInputStream>(); |
| (::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__ = ::windows::core::zeroed::<ResponseInformation>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferPriority>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Storage::IStorageFile>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundUploadProgress>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperationWithProgress<UploadOperation, UploadOperation>>(); |
| (::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__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperationWithProgress<UploadOperation, UploadOperation>>(); |
| (::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__ = ::windows::core::zeroed::<BackgroundTransferGroup>(); |
| (::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 ::core::cmp::PartialEq for UploadOperation { |
| fn eq(&self, other: &Self) -> bool { |
| self.0 == other.0 |
| } |
| } |
| impl ::core::cmp::Eq for UploadOperation {} |
| impl ::core::fmt::Debug for UploadOperation { |
| fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { |
| f.debug_tuple("UploadOperation").field(&self.0).finish() |
| } |
| } |
| impl ::windows::core::RuntimeType for UploadOperation { |
| const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Networking.BackgroundTransfer.UploadOperation;{3e5624e0-7389-434c-8b35-427fd36bbdae})"); |
| } |
| impl ::core::clone::Clone for UploadOperation { |
| fn clone(&self) -> Self { |
| Self(self.0.clone()) |
| } |
| } |
| 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::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 {} |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[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::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferBehavior;i4)"); |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[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::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferCostPolicy;i4)"); |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[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::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferPriority;i4)"); |
| } |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| #[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::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Networking.BackgroundTransfer.BackgroundTransferStatus;i4)"); |
| } |
| #[repr(C)] |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| 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::imp::ConstBuffer = ::windows::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)] |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| 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::imp::ConstBuffer = ::windows::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)] |
| #[doc = "*Required features: `\"Networking_BackgroundTransfer\"`*"] |
| 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::imp::ConstBuffer = ::windows::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"); |