]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Security/DataProtection/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Security / DataProtection / mod.rs
1 #[doc(hidden)]
2 #[repr(transparent)]
3 pub struct IUserDataAvailabilityStateChangedEventArgs(::windows::core::IUnknown);
4 unsafe impl ::windows::core::Interface for IUserDataAvailabilityStateChangedEventArgs {
5 type Vtable = IUserDataAvailabilityStateChangedEventArgs_Vtbl;
6 }
7 impl ::core::clone::Clone for IUserDataAvailabilityStateChangedEventArgs {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11 }
12 unsafe impl ::windows::core::ComInterface for IUserDataAvailabilityStateChangedEventArgs {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa76582c9_06a2_4273_a803_834c9f87fbeb);
14 }
15 #[repr(C)]
16 #[doc(hidden)]
17 pub struct IUserDataAvailabilityStateChangedEventArgs_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 #[cfg(feature = "Foundation")]
20 pub GetDeferral: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
21 #[cfg(not(feature = "Foundation"))]
22 GetDeferral: usize,
23 }
24 #[doc(hidden)]
25 #[repr(transparent)]
26 pub struct IUserDataBufferUnprotectResult(::windows::core::IUnknown);
27 unsafe impl ::windows::core::Interface for IUserDataBufferUnprotectResult {
28 type Vtable = IUserDataBufferUnprotectResult_Vtbl;
29 }
30 impl ::core::clone::Clone for IUserDataBufferUnprotectResult {
31 fn clone(&self) -> Self {
32 Self(self.0.clone())
33 }
34 }
35 unsafe impl ::windows::core::ComInterface for IUserDataBufferUnprotectResult {
36 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8efd0e90_fa9a_46a4_a377_01cebf1e74d8);
37 }
38 #[repr(C)]
39 #[doc(hidden)]
40 pub struct IUserDataBufferUnprotectResult_Vtbl {
41 pub base__: ::windows::core::IInspectable_Vtbl,
42 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut UserDataBufferUnprotectStatus) -> ::windows::core::HRESULT,
43 #[cfg(feature = "Storage_Streams")]
44 pub UnprotectedBuffer: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
45 #[cfg(not(feature = "Storage_Streams"))]
46 UnprotectedBuffer: usize,
47 }
48 #[doc(hidden)]
49 #[repr(transparent)]
50 pub struct IUserDataProtectionManager(::windows::core::IUnknown);
51 unsafe impl ::windows::core::Interface for IUserDataProtectionManager {
52 type Vtable = IUserDataProtectionManager_Vtbl;
53 }
54 impl ::core::clone::Clone for IUserDataProtectionManager {
55 fn clone(&self) -> Self {
56 Self(self.0.clone())
57 }
58 }
59 unsafe impl ::windows::core::ComInterface for IUserDataProtectionManager {
60 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1f13237d_b42e_4a88_9480_0f240924c876);
61 }
62 #[repr(C)]
63 #[doc(hidden)]
64 pub struct IUserDataProtectionManager_Vtbl {
65 pub base__: ::windows::core::IInspectable_Vtbl,
66 #[cfg(all(feature = "Foundation", feature = "Storage"))]
67 pub ProtectStorageItemAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, storageitem: *mut ::core::ffi::c_void, availability: UserDataAvailability, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
68 #[cfg(not(all(feature = "Foundation", feature = "Storage")))]
69 ProtectStorageItemAsync: usize,
70 #[cfg(all(feature = "Foundation", feature = "Storage"))]
71 pub GetStorageItemProtectionInfoAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, storageitem: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
72 #[cfg(not(all(feature = "Foundation", feature = "Storage")))]
73 GetStorageItemProtectionInfoAsync: usize,
74 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
75 pub ProtectBufferAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, unprotectedbuffer: *mut ::core::ffi::c_void, availability: UserDataAvailability, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
76 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))]
77 ProtectBufferAsync: usize,
78 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
79 pub UnprotectBufferAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, protectedbuffer: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
80 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))]
81 UnprotectBufferAsync: usize,
82 pub IsContinuedDataAvailabilityExpected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, availability: UserDataAvailability, result__: *mut bool) -> ::windows::core::HRESULT,
83 #[cfg(feature = "Foundation")]
84 pub DataAvailabilityStateChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
85 #[cfg(not(feature = "Foundation"))]
86 DataAvailabilityStateChanged: usize,
87 #[cfg(feature = "Foundation")]
88 pub RemoveDataAvailabilityStateChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
89 #[cfg(not(feature = "Foundation"))]
90 RemoveDataAvailabilityStateChanged: usize,
91 }
92 #[doc(hidden)]
93 #[repr(transparent)]
94 pub struct IUserDataProtectionManagerStatics(::windows::core::IUnknown);
95 unsafe impl ::windows::core::Interface for IUserDataProtectionManagerStatics {
96 type Vtable = IUserDataProtectionManagerStatics_Vtbl;
97 }
98 impl ::core::clone::Clone for IUserDataProtectionManagerStatics {
99 fn clone(&self) -> Self {
100 Self(self.0.clone())
101 }
102 }
103 unsafe impl ::windows::core::ComInterface for IUserDataProtectionManagerStatics {
104 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x977780e8_6dce_4fae_af85_782ac2cf4572);
105 }
106 #[repr(C)]
107 #[doc(hidden)]
108 pub struct IUserDataProtectionManagerStatics_Vtbl {
109 pub base__: ::windows::core::IInspectable_Vtbl,
110 pub TryGetDefault: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
111 #[cfg(feature = "System")]
112 pub TryGetForUser: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, user: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
113 #[cfg(not(feature = "System"))]
114 TryGetForUser: usize,
115 }
116 #[doc(hidden)]
117 #[repr(transparent)]
118 pub struct IUserDataStorageItemProtectionInfo(::windows::core::IUnknown);
119 unsafe impl ::windows::core::Interface for IUserDataStorageItemProtectionInfo {
120 type Vtable = IUserDataStorageItemProtectionInfo_Vtbl;
121 }
122 impl ::core::clone::Clone for IUserDataStorageItemProtectionInfo {
123 fn clone(&self) -> Self {
124 Self(self.0.clone())
125 }
126 }
127 unsafe impl ::windows::core::ComInterface for IUserDataStorageItemProtectionInfo {
128 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5b6680f6_e87f_40a1_b19d_a6187a0c662f);
129 }
130 #[repr(C)]
131 #[doc(hidden)]
132 pub struct IUserDataStorageItemProtectionInfo_Vtbl {
133 pub base__: ::windows::core::IInspectable_Vtbl,
134 pub Availability: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut UserDataAvailability) -> ::windows::core::HRESULT,
135 }
136 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
137 #[repr(transparent)]
138 pub struct UserDataAvailabilityStateChangedEventArgs(::windows::core::IUnknown);
139 impl UserDataAvailabilityStateChangedEventArgs {
140 #[doc = "*Required features: `\"Foundation\"`*"]
141 #[cfg(feature = "Foundation")]
142 pub fn GetDeferral(&self) -> ::windows::core::Result<super::super::Foundation::Deferral> {
143 let this = self;
144 unsafe {
145 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::Deferral>();
146 (::windows::core::Interface::vtable(this).GetDeferral)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
147 }
148 }
149 }
150 impl ::core::cmp::PartialEq for UserDataAvailabilityStateChangedEventArgs {
151 fn eq(&self, other: &Self) -> bool {
152 self.0 == other.0
153 }
154 }
155 impl ::core::cmp::Eq for UserDataAvailabilityStateChangedEventArgs {}
156 impl ::core::fmt::Debug for UserDataAvailabilityStateChangedEventArgs {
157 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
158 f.debug_tuple("UserDataAvailabilityStateChangedEventArgs").field(&self.0).finish()
159 }
160 }
161 impl ::windows::core::RuntimeType for UserDataAvailabilityStateChangedEventArgs {
162 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Security.DataProtection.UserDataAvailabilityStateChangedEventArgs;{a76582c9-06a2-4273-a803-834c9f87fbeb})");
163 }
164 impl ::core::clone::Clone for UserDataAvailabilityStateChangedEventArgs {
165 fn clone(&self) -> Self {
166 Self(self.0.clone())
167 }
168 }
169 unsafe impl ::windows::core::Interface for UserDataAvailabilityStateChangedEventArgs {
170 type Vtable = IUserDataAvailabilityStateChangedEventArgs_Vtbl;
171 }
172 unsafe impl ::windows::core::ComInterface for UserDataAvailabilityStateChangedEventArgs {
173 const IID: ::windows::core::GUID = <IUserDataAvailabilityStateChangedEventArgs as ::windows::core::ComInterface>::IID;
174 }
175 impl ::windows::core::RuntimeName for UserDataAvailabilityStateChangedEventArgs {
176 const NAME: &'static str = "Windows.Security.DataProtection.UserDataAvailabilityStateChangedEventArgs";
177 }
178 ::windows::imp::interface_hierarchy!(UserDataAvailabilityStateChangedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
179 unsafe impl ::core::marker::Send for UserDataAvailabilityStateChangedEventArgs {}
180 unsafe impl ::core::marker::Sync for UserDataAvailabilityStateChangedEventArgs {}
181 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
182 #[repr(transparent)]
183 pub struct UserDataBufferUnprotectResult(::windows::core::IUnknown);
184 impl UserDataBufferUnprotectResult {
185 pub fn Status(&self) -> ::windows::core::Result<UserDataBufferUnprotectStatus> {
186 let this = self;
187 unsafe {
188 let mut result__ = ::windows::core::zeroed::<UserDataBufferUnprotectStatus>();
189 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
190 }
191 }
192 #[doc = "*Required features: `\"Storage_Streams\"`*"]
193 #[cfg(feature = "Storage_Streams")]
194 pub fn UnprotectedBuffer(&self) -> ::windows::core::Result<super::super::Storage::Streams::IBuffer> {
195 let this = self;
196 unsafe {
197 let mut result__ = ::windows::core::zeroed::<super::super::Storage::Streams::IBuffer>();
198 (::windows::core::Interface::vtable(this).UnprotectedBuffer)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
199 }
200 }
201 }
202 impl ::core::cmp::PartialEq for UserDataBufferUnprotectResult {
203 fn eq(&self, other: &Self) -> bool {
204 self.0 == other.0
205 }
206 }
207 impl ::core::cmp::Eq for UserDataBufferUnprotectResult {}
208 impl ::core::fmt::Debug for UserDataBufferUnprotectResult {
209 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
210 f.debug_tuple("UserDataBufferUnprotectResult").field(&self.0).finish()
211 }
212 }
213 impl ::windows::core::RuntimeType for UserDataBufferUnprotectResult {
214 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Security.DataProtection.UserDataBufferUnprotectResult;{8efd0e90-fa9a-46a4-a377-01cebf1e74d8})");
215 }
216 impl ::core::clone::Clone for UserDataBufferUnprotectResult {
217 fn clone(&self) -> Self {
218 Self(self.0.clone())
219 }
220 }
221 unsafe impl ::windows::core::Interface for UserDataBufferUnprotectResult {
222 type Vtable = IUserDataBufferUnprotectResult_Vtbl;
223 }
224 unsafe impl ::windows::core::ComInterface for UserDataBufferUnprotectResult {
225 const IID: ::windows::core::GUID = <IUserDataBufferUnprotectResult as ::windows::core::ComInterface>::IID;
226 }
227 impl ::windows::core::RuntimeName for UserDataBufferUnprotectResult {
228 const NAME: &'static str = "Windows.Security.DataProtection.UserDataBufferUnprotectResult";
229 }
230 ::windows::imp::interface_hierarchy!(UserDataBufferUnprotectResult, ::windows::core::IUnknown, ::windows::core::IInspectable);
231 unsafe impl ::core::marker::Send for UserDataBufferUnprotectResult {}
232 unsafe impl ::core::marker::Sync for UserDataBufferUnprotectResult {}
233 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
234 #[repr(transparent)]
235 pub struct UserDataProtectionManager(::windows::core::IUnknown);
236 impl UserDataProtectionManager {
237 #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"]
238 #[cfg(all(feature = "Foundation", feature = "Storage"))]
239 pub fn ProtectStorageItemAsync<P0>(&self, storageitem: P0, availability: UserDataAvailability) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UserDataStorageItemProtectionStatus>>
240 where
241 P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageItem>,
242 {
243 let this = self;
244 unsafe {
245 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UserDataStorageItemProtectionStatus>>();
246 (::windows::core::Interface::vtable(this).ProtectStorageItemAsync)(::windows::core::Interface::as_raw(this), storageitem.try_into_param()?.abi(), availability, &mut result__).from_abi(result__)
247 }
248 }
249 #[doc = "*Required features: `\"Foundation\"`, `\"Storage\"`*"]
250 #[cfg(all(feature = "Foundation", feature = "Storage"))]
251 pub fn GetStorageItemProtectionInfoAsync<P0>(&self, storageitem: P0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UserDataStorageItemProtectionInfo>>
252 where
253 P0: ::windows::core::TryIntoParam<super::super::Storage::IStorageItem>,
254 {
255 let this = self;
256 unsafe {
257 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UserDataStorageItemProtectionInfo>>();
258 (::windows::core::Interface::vtable(this).GetStorageItemProtectionInfoAsync)(::windows::core::Interface::as_raw(this), storageitem.try_into_param()?.abi(), &mut result__).from_abi(result__)
259 }
260 }
261 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"]
262 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
263 pub fn ProtectBufferAsync<P0>(&self, unprotectedbuffer: P0, availability: UserDataAvailability) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>>
264 where
265 P0: ::windows::core::TryIntoParam<super::super::Storage::Streams::IBuffer>,
266 {
267 let this = self;
268 unsafe {
269 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<super::super::Storage::Streams::IBuffer>>();
270 (::windows::core::Interface::vtable(this).ProtectBufferAsync)(::windows::core::Interface::as_raw(this), unprotectedbuffer.try_into_param()?.abi(), availability, &mut result__).from_abi(result__)
271 }
272 }
273 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"]
274 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
275 pub fn UnprotectBufferAsync<P0>(&self, protectedbuffer: P0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<UserDataBufferUnprotectResult>>
276 where
277 P0: ::windows::core::TryIntoParam<super::super::Storage::Streams::IBuffer>,
278 {
279 let this = self;
280 unsafe {
281 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::IAsyncOperation<UserDataBufferUnprotectResult>>();
282 (::windows::core::Interface::vtable(this).UnprotectBufferAsync)(::windows::core::Interface::as_raw(this), protectedbuffer.try_into_param()?.abi(), &mut result__).from_abi(result__)
283 }
284 }
285 pub fn IsContinuedDataAvailabilityExpected(&self, availability: UserDataAvailability) -> ::windows::core::Result<bool> {
286 let this = self;
287 unsafe {
288 let mut result__ = ::windows::core::zeroed::<bool>();
289 (::windows::core::Interface::vtable(this).IsContinuedDataAvailabilityExpected)(::windows::core::Interface::as_raw(this), availability, &mut result__).from_abi(result__)
290 }
291 }
292 #[doc = "*Required features: `\"Foundation\"`*"]
293 #[cfg(feature = "Foundation")]
294 pub fn DataAvailabilityStateChanged(&self, handler: &super::super::Foundation::TypedEventHandler<UserDataProtectionManager, UserDataAvailabilityStateChangedEventArgs>) -> ::windows::core::Result<super::super::Foundation::EventRegistrationToken> {
295 let this = self;
296 unsafe {
297 let mut result__ = ::windows::core::zeroed::<super::super::Foundation::EventRegistrationToken>();
298 (::windows::core::Interface::vtable(this).DataAvailabilityStateChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
299 }
300 }
301 #[doc = "*Required features: `\"Foundation\"`*"]
302 #[cfg(feature = "Foundation")]
303 pub fn RemoveDataAvailabilityStateChanged(&self, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
304 let this = self;
305 unsafe { (::windows::core::Interface::vtable(this).RemoveDataAvailabilityStateChanged)(::windows::core::Interface::as_raw(this), token).ok() }
306 }
307 pub fn TryGetDefault() -> ::windows::core::Result<UserDataProtectionManager> {
308 Self::IUserDataProtectionManagerStatics(|this| unsafe {
309 let mut result__ = ::windows::core::zeroed::<UserDataProtectionManager>();
310 (::windows::core::Interface::vtable(this).TryGetDefault)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
311 })
312 }
313 #[doc = "*Required features: `\"System\"`*"]
314 #[cfg(feature = "System")]
315 pub fn TryGetForUser(user: &super::super::System::User) -> ::windows::core::Result<UserDataProtectionManager> {
316 Self::IUserDataProtectionManagerStatics(|this| unsafe {
317 let mut result__ = ::windows::core::zeroed::<UserDataProtectionManager>();
318 (::windows::core::Interface::vtable(this).TryGetForUser)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(user), &mut result__).from_abi(result__)
319 })
320 }
321 #[doc(hidden)]
322 pub fn IUserDataProtectionManagerStatics<R, F: FnOnce(&IUserDataProtectionManagerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
323 static SHARED: ::windows::imp::FactoryCache<UserDataProtectionManager, IUserDataProtectionManagerStatics> = ::windows::imp::FactoryCache::new();
324 SHARED.call(callback)
325 }
326 }
327 impl ::core::cmp::PartialEq for UserDataProtectionManager {
328 fn eq(&self, other: &Self) -> bool {
329 self.0 == other.0
330 }
331 }
332 impl ::core::cmp::Eq for UserDataProtectionManager {}
333 impl ::core::fmt::Debug for UserDataProtectionManager {
334 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
335 f.debug_tuple("UserDataProtectionManager").field(&self.0).finish()
336 }
337 }
338 impl ::windows::core::RuntimeType for UserDataProtectionManager {
339 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Security.DataProtection.UserDataProtectionManager;{1f13237d-b42e-4a88-9480-0f240924c876})");
340 }
341 impl ::core::clone::Clone for UserDataProtectionManager {
342 fn clone(&self) -> Self {
343 Self(self.0.clone())
344 }
345 }
346 unsafe impl ::windows::core::Interface for UserDataProtectionManager {
347 type Vtable = IUserDataProtectionManager_Vtbl;
348 }
349 unsafe impl ::windows::core::ComInterface for UserDataProtectionManager {
350 const IID: ::windows::core::GUID = <IUserDataProtectionManager as ::windows::core::ComInterface>::IID;
351 }
352 impl ::windows::core::RuntimeName for UserDataProtectionManager {
353 const NAME: &'static str = "Windows.Security.DataProtection.UserDataProtectionManager";
354 }
355 ::windows::imp::interface_hierarchy!(UserDataProtectionManager, ::windows::core::IUnknown, ::windows::core::IInspectable);
356 unsafe impl ::core::marker::Send for UserDataProtectionManager {}
357 unsafe impl ::core::marker::Sync for UserDataProtectionManager {}
358 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
359 #[repr(transparent)]
360 pub struct UserDataStorageItemProtectionInfo(::windows::core::IUnknown);
361 impl UserDataStorageItemProtectionInfo {
362 pub fn Availability(&self) -> ::windows::core::Result<UserDataAvailability> {
363 let this = self;
364 unsafe {
365 let mut result__ = ::windows::core::zeroed::<UserDataAvailability>();
366 (::windows::core::Interface::vtable(this).Availability)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
367 }
368 }
369 }
370 impl ::core::cmp::PartialEq for UserDataStorageItemProtectionInfo {
371 fn eq(&self, other: &Self) -> bool {
372 self.0 == other.0
373 }
374 }
375 impl ::core::cmp::Eq for UserDataStorageItemProtectionInfo {}
376 impl ::core::fmt::Debug for UserDataStorageItemProtectionInfo {
377 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
378 f.debug_tuple("UserDataStorageItemProtectionInfo").field(&self.0).finish()
379 }
380 }
381 impl ::windows::core::RuntimeType for UserDataStorageItemProtectionInfo {
382 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Security.DataProtection.UserDataStorageItemProtectionInfo;{5b6680f6-e87f-40a1-b19d-a6187a0c662f})");
383 }
384 impl ::core::clone::Clone for UserDataStorageItemProtectionInfo {
385 fn clone(&self) -> Self {
386 Self(self.0.clone())
387 }
388 }
389 unsafe impl ::windows::core::Interface for UserDataStorageItemProtectionInfo {
390 type Vtable = IUserDataStorageItemProtectionInfo_Vtbl;
391 }
392 unsafe impl ::windows::core::ComInterface for UserDataStorageItemProtectionInfo {
393 const IID: ::windows::core::GUID = <IUserDataStorageItemProtectionInfo as ::windows::core::ComInterface>::IID;
394 }
395 impl ::windows::core::RuntimeName for UserDataStorageItemProtectionInfo {
396 const NAME: &'static str = "Windows.Security.DataProtection.UserDataStorageItemProtectionInfo";
397 }
398 ::windows::imp::interface_hierarchy!(UserDataStorageItemProtectionInfo, ::windows::core::IUnknown, ::windows::core::IInspectable);
399 unsafe impl ::core::marker::Send for UserDataStorageItemProtectionInfo {}
400 unsafe impl ::core::marker::Sync for UserDataStorageItemProtectionInfo {}
401 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
402 #[repr(transparent)]
403 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
404 pub struct UserDataAvailability(pub i32);
405 impl UserDataAvailability {
406 pub const Always: Self = Self(0i32);
407 pub const AfterFirstUnlock: Self = Self(1i32);
408 pub const WhileUnlocked: Self = Self(2i32);
409 }
410 impl ::core::marker::Copy for UserDataAvailability {}
411 impl ::core::clone::Clone for UserDataAvailability {
412 fn clone(&self) -> Self {
413 *self
414 }
415 }
416 impl ::core::default::Default for UserDataAvailability {
417 fn default() -> Self {
418 Self(0)
419 }
420 }
421 impl ::windows::core::TypeKind for UserDataAvailability {
422 type TypeKind = ::windows::core::CopyType;
423 }
424 impl ::core::fmt::Debug for UserDataAvailability {
425 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
426 f.debug_tuple("UserDataAvailability").field(&self.0).finish()
427 }
428 }
429 impl ::windows::core::RuntimeType for UserDataAvailability {
430 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Security.DataProtection.UserDataAvailability;i4)");
431 }
432 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
433 #[repr(transparent)]
434 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
435 pub struct UserDataBufferUnprotectStatus(pub i32);
436 impl UserDataBufferUnprotectStatus {
437 pub const Succeeded: Self = Self(0i32);
438 pub const Unavailable: Self = Self(1i32);
439 }
440 impl ::core::marker::Copy for UserDataBufferUnprotectStatus {}
441 impl ::core::clone::Clone for UserDataBufferUnprotectStatus {
442 fn clone(&self) -> Self {
443 *self
444 }
445 }
446 impl ::core::default::Default for UserDataBufferUnprotectStatus {
447 fn default() -> Self {
448 Self(0)
449 }
450 }
451 impl ::windows::core::TypeKind for UserDataBufferUnprotectStatus {
452 type TypeKind = ::windows::core::CopyType;
453 }
454 impl ::core::fmt::Debug for UserDataBufferUnprotectStatus {
455 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
456 f.debug_tuple("UserDataBufferUnprotectStatus").field(&self.0).finish()
457 }
458 }
459 impl ::windows::core::RuntimeType for UserDataBufferUnprotectStatus {
460 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Security.DataProtection.UserDataBufferUnprotectStatus;i4)");
461 }
462 #[doc = "*Required features: `\"Security_DataProtection\"`*"]
463 #[repr(transparent)]
464 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
465 pub struct UserDataStorageItemProtectionStatus(pub i32);
466 impl UserDataStorageItemProtectionStatus {
467 pub const Succeeded: Self = Self(0i32);
468 pub const NotProtectable: Self = Self(1i32);
469 pub const DataUnavailable: Self = Self(2i32);
470 }
471 impl ::core::marker::Copy for UserDataStorageItemProtectionStatus {}
472 impl ::core::clone::Clone for UserDataStorageItemProtectionStatus {
473 fn clone(&self) -> Self {
474 *self
475 }
476 }
477 impl ::core::default::Default for UserDataStorageItemProtectionStatus {
478 fn default() -> Self {
479 Self(0)
480 }
481 }
482 impl ::windows::core::TypeKind for UserDataStorageItemProtectionStatus {
483 type TypeKind = ::windows::core::CopyType;
484 }
485 impl ::core::fmt::Debug for UserDataStorageItemProtectionStatus {
486 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
487 f.debug_tuple("UserDataStorageItemProtectionStatus").field(&self.0).finish()
488 }
489 }
490 impl ::windows::core::RuntimeType for UserDataStorageItemProtectionStatus {
491 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Security.DataProtection.UserDataStorageItemProtectionStatus;i4)");
492 }
493 #[cfg(feature = "implement")]
494 ::core::include!("impl.rs");