]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/Management/Deployment/Preview/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / Management / Deployment / Preview / mod.rs
CommitLineData
353b0b11
FG
1#[doc(hidden)]
2#[repr(transparent)]
3pub struct IClassicAppManagerStatics(::windows::core::IUnknown);
4unsafe impl ::windows::core::Interface for IClassicAppManagerStatics {
5 type Vtable = IClassicAppManagerStatics_Vtbl;
6}
7impl ::core::clone::Clone for IClassicAppManagerStatics {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11}
12unsafe impl ::windows::core::ComInterface for IClassicAppManagerStatics {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe2fad668_882c_4f33_b035_0df7b90d67e6);
14}
15#[repr(C)]
16#[doc(hidden)]
17pub struct IClassicAppManagerStatics_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 pub FindInstalledApp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, appuninstallkey: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
20}
21#[doc(hidden)]
22#[repr(transparent)]
23pub struct IInstalledClassicAppInfo(::windows::core::IUnknown);
24unsafe impl ::windows::core::Interface for IInstalledClassicAppInfo {
25 type Vtable = IInstalledClassicAppInfo_Vtbl;
26}
27impl ::core::clone::Clone for IInstalledClassicAppInfo {
28 fn clone(&self) -> Self {
29 Self(self.0.clone())
30 }
31}
32unsafe impl ::windows::core::ComInterface for IInstalledClassicAppInfo {
33 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0a7d3da3_65d0_4086_80d6_0610d760207d);
34}
35#[repr(C)]
36#[doc(hidden)]
37pub struct IInstalledClassicAppInfo_Vtbl {
38 pub base__: ::windows::core::IInspectable_Vtbl,
39 pub DisplayName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
40 pub DisplayVersion: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
41}
42#[doc = "*Required features: `\"Management_Deployment_Preview\"`*"]
43pub struct ClassicAppManager;
44impl ClassicAppManager {
45 pub fn FindInstalledApp(appuninstallkey: &::windows::core::HSTRING) -> ::windows::core::Result<InstalledClassicAppInfo> {
46 Self::IClassicAppManagerStatics(|this| unsafe {
47 let mut result__ = ::windows::core::zeroed::<InstalledClassicAppInfo>();
48 (::windows::core::Interface::vtable(this).FindInstalledApp)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(appuninstallkey), &mut result__).from_abi(result__)
49 })
50 }
51 #[doc(hidden)]
52 pub fn IClassicAppManagerStatics<R, F: FnOnce(&IClassicAppManagerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
53 static SHARED: ::windows::imp::FactoryCache<ClassicAppManager, IClassicAppManagerStatics> = ::windows::imp::FactoryCache::new();
54 SHARED.call(callback)
55 }
56}
57impl ::windows::core::RuntimeName for ClassicAppManager {
58 const NAME: &'static str = "Windows.Management.Deployment.Preview.ClassicAppManager";
59}
60#[doc = "*Required features: `\"Management_Deployment_Preview\"`*"]
61#[repr(transparent)]
62pub struct InstalledClassicAppInfo(::windows::core::IUnknown);
63impl InstalledClassicAppInfo {
64 pub fn DisplayName(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
65 let this = self;
66 unsafe {
67 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
68 (::windows::core::Interface::vtable(this).DisplayName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
69 }
70 }
71 pub fn DisplayVersion(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
72 let this = self;
73 unsafe {
74 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
75 (::windows::core::Interface::vtable(this).DisplayVersion)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
76 }
77 }
78}
79impl ::core::cmp::PartialEq for InstalledClassicAppInfo {
80 fn eq(&self, other: &Self) -> bool {
81 self.0 == other.0
82 }
83}
84impl ::core::cmp::Eq for InstalledClassicAppInfo {}
85impl ::core::fmt::Debug for InstalledClassicAppInfo {
86 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
87 f.debug_tuple("InstalledClassicAppInfo").field(&self.0).finish()
88 }
89}
90impl ::windows::core::RuntimeType for InstalledClassicAppInfo {
91 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Management.Deployment.Preview.InstalledClassicAppInfo;{0a7d3da3-65d0-4086-80d6-0610d760207d})");
92}
93impl ::core::clone::Clone for InstalledClassicAppInfo {
94 fn clone(&self) -> Self {
95 Self(self.0.clone())
96 }
97}
98unsafe impl ::windows::core::Interface for InstalledClassicAppInfo {
99 type Vtable = IInstalledClassicAppInfo_Vtbl;
100}
101unsafe impl ::windows::core::ComInterface for InstalledClassicAppInfo {
102 const IID: ::windows::core::GUID = <IInstalledClassicAppInfo as ::windows::core::ComInterface>::IID;
103}
104impl ::windows::core::RuntimeName for InstalledClassicAppInfo {
105 const NAME: &'static str = "Windows.Management.Deployment.Preview.InstalledClassicAppInfo";
106}
107::windows::imp::interface_hierarchy!(InstalledClassicAppInfo, ::windows::core::IUnknown, ::windows::core::IInspectable);
108unsafe impl ::core::marker::Send for InstalledClassicAppInfo {}
109unsafe impl ::core::marker::Sync for InstalledClassicAppInfo {}
110#[cfg(feature = "implement")]
111::core::include!("impl.rs");