]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/ApplicationModel/CommunicationBlocking/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / ApplicationModel / CommunicationBlocking / mod.rs
CommitLineData
353b0b11
FG
1#[doc(hidden)]
2#[repr(transparent)]
3pub struct ICommunicationBlockingAccessManagerStatics(::windows::core::IUnknown);
4unsafe impl ::windows::core::Interface for ICommunicationBlockingAccessManagerStatics {
5 type Vtable = ICommunicationBlockingAccessManagerStatics_Vtbl;
6}
7impl ::core::clone::Clone for ICommunicationBlockingAccessManagerStatics {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11}
12unsafe impl ::windows::core::ComInterface for ICommunicationBlockingAccessManagerStatics {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1c969998_9d2a_5db7_edd5_0ce407fc2595);
14}
15#[repr(C)]
16#[doc(hidden)]
17pub struct ICommunicationBlockingAccessManagerStatics_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 pub IsBlockingActive: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
20 #[cfg(feature = "Foundation")]
21 pub IsBlockedNumberAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, number: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
22 #[cfg(not(feature = "Foundation"))]
23 IsBlockedNumberAsync: usize,
24 #[cfg(feature = "Foundation_Collections")]
25 pub ShowBlockNumbersUI: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, phonenumbers: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
26 #[cfg(not(feature = "Foundation_Collections"))]
27 ShowBlockNumbersUI: usize,
28 #[cfg(feature = "Foundation_Collections")]
29 pub ShowUnblockNumbersUI: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, phonenumbers: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
30 #[cfg(not(feature = "Foundation_Collections"))]
31 ShowUnblockNumbersUI: usize,
32 pub ShowBlockedCallsUI: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
33 pub ShowBlockedMessagesUI: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
34}
35#[doc(hidden)]
36#[repr(transparent)]
37pub struct ICommunicationBlockingAppManagerStatics(::windows::core::IUnknown);
38unsafe impl ::windows::core::Interface for ICommunicationBlockingAppManagerStatics {
39 type Vtable = ICommunicationBlockingAppManagerStatics_Vtbl;
40}
41impl ::core::clone::Clone for ICommunicationBlockingAppManagerStatics {
42 fn clone(&self) -> Self {
43 Self(self.0.clone())
44 }
45}
46unsafe impl ::windows::core::ComInterface for ICommunicationBlockingAppManagerStatics {
47 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x77db58ec_14a6_4baa_942a_6a673d999bf2);
48}
49#[repr(C)]
50#[doc(hidden)]
51pub struct ICommunicationBlockingAppManagerStatics_Vtbl {
52 pub base__: ::windows::core::IInspectable_Vtbl,
53 pub IsCurrentAppActiveBlockingApp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
54 pub ShowCommunicationBlockingSettingsUI: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
55}
56#[doc(hidden)]
57#[repr(transparent)]
58pub struct ICommunicationBlockingAppManagerStatics2(::windows::core::IUnknown);
59unsafe impl ::windows::core::Interface for ICommunicationBlockingAppManagerStatics2 {
60 type Vtable = ICommunicationBlockingAppManagerStatics2_Vtbl;
61}
62impl ::core::clone::Clone for ICommunicationBlockingAppManagerStatics2 {
63 fn clone(&self) -> Self {
64 Self(self.0.clone())
65 }
66}
67unsafe impl ::windows::core::ComInterface for ICommunicationBlockingAppManagerStatics2 {
68 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x14a68edd_ed88_457a_a364_a3634d6f166d);
69}
70#[repr(C)]
71#[doc(hidden)]
72pub struct ICommunicationBlockingAppManagerStatics2_Vtbl {
73 pub base__: ::windows::core::IInspectable_Vtbl,
74 #[cfg(feature = "Foundation")]
75 pub RequestSetAsActiveBlockingAppAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
76 #[cfg(not(feature = "Foundation"))]
77 RequestSetAsActiveBlockingAppAsync: usize,
78}
79#[doc = "*Required features: `\"ApplicationModel_CommunicationBlocking\"`*"]
80pub struct CommunicationBlockingAccessManager;
81impl CommunicationBlockingAccessManager {
82 pub fn IsBlockingActive() -> ::windows::core::Result<bool> {
83 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
84 let mut result__ = ::windows::core::zeroed::<bool>();
85 (::windows::core::Interface::vtable(this).IsBlockingActive)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
86 })
87 }
88 #[doc = "*Required features: `\"Foundation\"`*"]
89 #[cfg(feature = "Foundation")]
90 pub fn IsBlockedNumberAsync(number: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> {
91 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
92 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<bool>>();
93 (::windows::core::Interface::vtable(this).IsBlockedNumberAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(number), &mut result__).from_abi(result__)
94 })
95 }
96 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
97 #[cfg(feature = "Foundation_Collections")]
98 pub fn ShowBlockNumbersUI<P0>(phonenumbers: P0) -> ::windows::core::Result<bool>
99 where
100 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
101 {
102 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
103 let mut result__ = ::windows::core::zeroed::<bool>();
104 (::windows::core::Interface::vtable(this).ShowBlockNumbersUI)(::windows::core::Interface::as_raw(this), phonenumbers.try_into_param()?.abi(), &mut result__).from_abi(result__)
105 })
106 }
107 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
108 #[cfg(feature = "Foundation_Collections")]
109 pub fn ShowUnblockNumbersUI<P0>(phonenumbers: P0) -> ::windows::core::Result<bool>
110 where
111 P0: ::windows::core::TryIntoParam<super::super::Foundation::Collections::IIterable<::windows::core::HSTRING>>,
112 {
113 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe {
114 let mut result__ = ::windows::core::zeroed::<bool>();
115 (::windows::core::Interface::vtable(this).ShowUnblockNumbersUI)(::windows::core::Interface::as_raw(this), phonenumbers.try_into_param()?.abi(), &mut result__).from_abi(result__)
116 })
117 }
118 pub fn ShowBlockedCallsUI() -> ::windows::core::Result<()> {
119 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).ShowBlockedCallsUI)(::windows::core::Interface::as_raw(this)).ok() })
120 }
121 pub fn ShowBlockedMessagesUI() -> ::windows::core::Result<()> {
122 Self::ICommunicationBlockingAccessManagerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).ShowBlockedMessagesUI)(::windows::core::Interface::as_raw(this)).ok() })
123 }
124 #[doc(hidden)]
125 pub fn ICommunicationBlockingAccessManagerStatics<R, F: FnOnce(&ICommunicationBlockingAccessManagerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
126 static SHARED: ::windows::imp::FactoryCache<CommunicationBlockingAccessManager, ICommunicationBlockingAccessManagerStatics> = ::windows::imp::FactoryCache::new();
127 SHARED.call(callback)
128 }
129}
130impl ::windows::core::RuntimeName for CommunicationBlockingAccessManager {
131 const NAME: &'static str = "Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingAccessManager";
132}
133#[doc = "*Required features: `\"ApplicationModel_CommunicationBlocking\"`*"]
134pub struct CommunicationBlockingAppManager;
135impl CommunicationBlockingAppManager {
136 pub fn IsCurrentAppActiveBlockingApp() -> ::windows::core::Result<bool> {
137 Self::ICommunicationBlockingAppManagerStatics(|this| unsafe {
138 let mut result__ = ::windows::core::zeroed::<bool>();
139 (::windows::core::Interface::vtable(this).IsCurrentAppActiveBlockingApp)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
140 })
141 }
142 pub fn ShowCommunicationBlockingSettingsUI() -> ::windows::core::Result<()> {
143 Self::ICommunicationBlockingAppManagerStatics(|this| unsafe { (::windows::core::Interface::vtable(this).ShowCommunicationBlockingSettingsUI)(::windows::core::Interface::as_raw(this)).ok() })
144 }
145 #[doc = "*Required features: `\"Foundation\"`*"]
146 #[cfg(feature = "Foundation")]
147 pub fn RequestSetAsActiveBlockingAppAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<bool>> {
148 Self::ICommunicationBlockingAppManagerStatics2(|this| unsafe {
149 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<bool>>();
150 (::windows::core::Interface::vtable(this).RequestSetAsActiveBlockingAppAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
151 })
152 }
153 #[doc(hidden)]
154 pub fn ICommunicationBlockingAppManagerStatics<R, F: FnOnce(&ICommunicationBlockingAppManagerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
155 static SHARED: ::windows::imp::FactoryCache<CommunicationBlockingAppManager, ICommunicationBlockingAppManagerStatics> = ::windows::imp::FactoryCache::new();
156 SHARED.call(callback)
157 }
158 #[doc(hidden)]
159 pub fn ICommunicationBlockingAppManagerStatics2<R, F: FnOnce(&ICommunicationBlockingAppManagerStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
160 static SHARED: ::windows::imp::FactoryCache<CommunicationBlockingAppManager, ICommunicationBlockingAppManagerStatics2> = ::windows::imp::FactoryCache::new();
161 SHARED.call(callback)
162 }
163}
164impl ::windows::core::RuntimeName for CommunicationBlockingAppManager {
165 const NAME: &'static str = "Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingAppManager";
166}
167#[cfg(feature = "implement")]
168::core::include!("impl.rs");