]>
Commit | Line | Data |
---|---|---|
353b0b11 FG |
1 | #[doc(hidden)] |
2 | #[repr(transparent)] | |
3 | pub struct IEnterprise(::windows::core::IUnknown); | |
4 | unsafe impl ::windows::core::Interface for IEnterprise { | |
5 | type Vtable = IEnterprise_Vtbl; | |
6 | } | |
7 | impl ::core::clone::Clone for IEnterprise { | |
8 | fn clone(&self) -> Self { | |
9 | Self(self.0.clone()) | |
10 | } | |
11 | } | |
12 | unsafe impl ::windows::core::ComInterface for IEnterprise { | |
13 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x96592f8d_856c_4426_a947_b06307718078); | |
14 | } | |
15 | #[repr(C)] | |
16 | #[doc(hidden)] | |
17 | pub struct IEnterprise_Vtbl { | |
18 | pub base__: ::windows::core::IInspectable_Vtbl, | |
19 | pub Id: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::GUID) -> ::windows::core::HRESULT, | |
20 | pub Name: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT, | |
21 | pub WorkplaceId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT, | |
22 | #[cfg(feature = "Foundation")] | |
23 | pub EnrollmentValidFrom: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::DateTime) -> ::windows::core::HRESULT, | |
24 | #[cfg(not(feature = "Foundation"))] | |
25 | EnrollmentValidFrom: usize, | |
26 | #[cfg(feature = "Foundation")] | |
27 | pub EnrollmentValidTo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::DateTime) -> ::windows::core::HRESULT, | |
28 | #[cfg(not(feature = "Foundation"))] | |
29 | EnrollmentValidTo: usize, | |
30 | pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut EnterpriseStatus) -> ::windows::core::HRESULT, | |
31 | } | |
32 | #[doc(hidden)] | |
33 | #[repr(transparent)] | |
34 | pub struct IEnterpriseEnrollmentManager(::windows::core::IUnknown); | |
35 | unsafe impl ::windows::core::Interface for IEnterpriseEnrollmentManager { | |
36 | type Vtable = IEnterpriseEnrollmentManager_Vtbl; | |
37 | } | |
38 | impl ::core::clone::Clone for IEnterpriseEnrollmentManager { | |
39 | fn clone(&self) -> Self { | |
40 | Self(self.0.clone()) | |
41 | } | |
42 | } | |
43 | unsafe impl ::windows::core::ComInterface for IEnterpriseEnrollmentManager { | |
44 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x20f9f390_2c69_41d8_88e6_e4b3884026cb); | |
45 | } | |
46 | #[repr(C)] | |
47 | #[doc(hidden)] | |
48 | pub struct IEnterpriseEnrollmentManager_Vtbl { | |
49 | pub base__: ::windows::core::IInspectable_Vtbl, | |
50 | #[cfg(feature = "Foundation_Collections")] | |
51 | pub EnrolledEnterprises: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
52 | #[cfg(not(feature = "Foundation_Collections"))] | |
53 | EnrolledEnterprises: usize, | |
54 | pub CurrentEnterprise: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
55 | #[cfg(feature = "Foundation")] | |
56 | pub ValidateEnterprisesAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
57 | #[cfg(not(feature = "Foundation"))] | |
58 | ValidateEnterprisesAsync: usize, | |
59 | #[cfg(feature = "Foundation")] | |
60 | pub RequestEnrollmentAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, enrollmenttoken: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
61 | #[cfg(not(feature = "Foundation"))] | |
62 | RequestEnrollmentAsync: usize, | |
63 | #[cfg(feature = "Foundation")] | |
64 | pub RequestUnenrollmentAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, enterprise: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
65 | #[cfg(not(feature = "Foundation"))] | |
66 | RequestUnenrollmentAsync: usize, | |
67 | } | |
68 | #[doc(hidden)] | |
69 | #[repr(transparent)] | |
70 | pub struct IEnterpriseEnrollmentResult(::windows::core::IUnknown); | |
71 | unsafe impl ::windows::core::Interface for IEnterpriseEnrollmentResult { | |
72 | type Vtable = IEnterpriseEnrollmentResult_Vtbl; | |
73 | } | |
74 | impl ::core::clone::Clone for IEnterpriseEnrollmentResult { | |
75 | fn clone(&self) -> Self { | |
76 | Self(self.0.clone()) | |
77 | } | |
78 | } | |
79 | unsafe impl ::windows::core::ComInterface for IEnterpriseEnrollmentResult { | |
80 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ff71ce6_90db_4342_b326_1729aa91301c); | |
81 | } | |
82 | #[repr(C)] | |
83 | #[doc(hidden)] | |
84 | pub struct IEnterpriseEnrollmentResult_Vtbl { | |
85 | pub base__: ::windows::core::IInspectable_Vtbl, | |
86 | pub EnrolledEnterprise: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
87 | pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut EnterpriseEnrollmentStatus) -> ::windows::core::HRESULT, | |
88 | } | |
89 | #[doc(hidden)] | |
90 | #[repr(transparent)] | |
91 | pub struct IInstallationManagerStatics(::windows::core::IUnknown); | |
92 | unsafe impl ::windows::core::Interface for IInstallationManagerStatics { | |
93 | type Vtable = IInstallationManagerStatics_Vtbl; | |
94 | } | |
95 | impl ::core::clone::Clone for IInstallationManagerStatics { | |
96 | fn clone(&self) -> Self { | |
97 | Self(self.0.clone()) | |
98 | } | |
99 | } | |
100 | unsafe impl ::windows::core::ComInterface for IInstallationManagerStatics { | |
101 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x929aa738_8d49_42ac_80c9_b4ad793c43f2); | |
102 | } | |
103 | #[repr(C)] | |
104 | #[doc(hidden)] | |
105 | pub struct IInstallationManagerStatics_Vtbl { | |
106 | pub base__: ::windows::core::IInspectable_Vtbl, | |
107 | #[cfg(feature = "Foundation")] | |
108 | pub AddPackageAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, title: ::std::mem::MaybeUninit<::windows::core::HSTRING>, sourcelocation: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
109 | #[cfg(not(feature = "Foundation"))] | |
110 | AddPackageAsync: usize, | |
111 | #[cfg(feature = "Foundation")] | |
112 | pub AddPackagePreloadedAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, title: ::std::mem::MaybeUninit<::windows::core::HSTRING>, sourcelocation: *mut ::core::ffi::c_void, instanceid: ::std::mem::MaybeUninit<::windows::core::HSTRING>, offerid: ::std::mem::MaybeUninit<::windows::core::HSTRING>, license: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
113 | #[cfg(not(feature = "Foundation"))] | |
114 | AddPackagePreloadedAsync: usize, | |
115 | #[cfg(feature = "Foundation_Collections")] | |
116 | pub GetPendingPackageInstalls: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
117 | #[cfg(not(feature = "Foundation_Collections"))] | |
118 | GetPendingPackageInstalls: usize, | |
119 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
120 | pub FindPackagesForCurrentPublisher: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
121 | #[cfg(not(all(feature = "ApplicationModel", feature = "Foundation_Collections")))] | |
122 | FindPackagesForCurrentPublisher: usize, | |
123 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
124 | pub FindPackages: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
125 | #[cfg(not(all(feature = "ApplicationModel", feature = "Foundation_Collections")))] | |
126 | FindPackages: usize, | |
127 | } | |
128 | #[doc(hidden)] | |
129 | #[repr(transparent)] | |
130 | pub struct IInstallationManagerStatics2(::windows::core::IUnknown); | |
131 | unsafe impl ::windows::core::Interface for IInstallationManagerStatics2 { | |
132 | type Vtable = IInstallationManagerStatics2_Vtbl; | |
133 | } | |
134 | impl ::core::clone::Clone for IInstallationManagerStatics2 { | |
135 | fn clone(&self) -> Self { | |
136 | Self(self.0.clone()) | |
137 | } | |
138 | } | |
139 | unsafe impl ::windows::core::ComInterface for IInstallationManagerStatics2 { | |
140 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7c6c2cbd_fa4a_4c8e_ab97_d959452f19e5); | |
141 | } | |
142 | #[repr(C)] | |
143 | #[doc(hidden)] | |
144 | pub struct IInstallationManagerStatics2_Vtbl { | |
145 | pub base__: ::windows::core::IInspectable_Vtbl, | |
146 | #[cfg(all(feature = "Foundation", feature = "Management_Deployment"))] | |
147 | pub RemovePackageAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, packagefullname: ::std::mem::MaybeUninit<::windows::core::HSTRING>, removaloptions: super::super::super::Management::Deployment::RemovalOptions, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
148 | #[cfg(not(all(feature = "Foundation", feature = "Management_Deployment")))] | |
149 | RemovePackageAsync: usize, | |
150 | #[cfg(all(feature = "Foundation_Collections", feature = "Management_Deployment"))] | |
151 | pub RegisterPackageAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, manifesturi: *mut ::core::ffi::c_void, dependencypackageuris: *mut ::core::ffi::c_void, deploymentoptions: super::super::super::Management::Deployment::DeploymentOptions, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
152 | #[cfg(not(all(feature = "Foundation_Collections", feature = "Management_Deployment")))] | |
153 | RegisterPackageAsync: usize, | |
154 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
155 | pub FindPackagesByNamePublisher: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, packagename: ::std::mem::MaybeUninit<::windows::core::HSTRING>, packagepublisher: ::std::mem::MaybeUninit<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, | |
156 | #[cfg(not(all(feature = "ApplicationModel", feature = "Foundation_Collections")))] | |
157 | FindPackagesByNamePublisher: usize, | |
158 | } | |
159 | #[doc(hidden)] | |
160 | #[repr(transparent)] | |
161 | pub struct IPackageInstallResult(::windows::core::IUnknown); | |
162 | unsafe impl ::windows::core::Interface for IPackageInstallResult { | |
163 | type Vtable = IPackageInstallResult_Vtbl; | |
164 | } | |
165 | impl ::core::clone::Clone for IPackageInstallResult { | |
166 | fn clone(&self) -> Self { | |
167 | Self(self.0.clone()) | |
168 | } | |
169 | } | |
170 | unsafe impl ::windows::core::ComInterface for IPackageInstallResult { | |
171 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x33e8eed5_0f7e_4473_967c_7d6e1c0e7de1); | |
172 | } | |
173 | #[repr(C)] | |
174 | #[doc(hidden)] | |
175 | pub struct IPackageInstallResult_Vtbl { | |
176 | pub base__: ::windows::core::IInspectable_Vtbl, | |
177 | pub ProductId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT, | |
178 | #[cfg(feature = "Management_Deployment")] | |
179 | pub InstallState: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Management::Deployment::PackageInstallState) -> ::windows::core::HRESULT, | |
180 | #[cfg(not(feature = "Management_Deployment"))] | |
181 | InstallState: usize, | |
182 | } | |
183 | #[doc(hidden)] | |
184 | #[repr(transparent)] | |
185 | pub struct IPackageInstallResult2(::windows::core::IUnknown); | |
186 | unsafe impl ::windows::core::Interface for IPackageInstallResult2 { | |
187 | type Vtable = IPackageInstallResult2_Vtbl; | |
188 | } | |
189 | impl ::core::clone::Clone for IPackageInstallResult2 { | |
190 | fn clone(&self) -> Self { | |
191 | Self(self.0.clone()) | |
192 | } | |
193 | } | |
194 | unsafe impl ::windows::core::ComInterface for IPackageInstallResult2 { | |
195 | const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7149d909_3ff9_41ed_a717_2bc65ffc61d2); | |
196 | } | |
197 | #[repr(C)] | |
198 | #[doc(hidden)] | |
199 | pub struct IPackageInstallResult2_Vtbl { | |
200 | pub base__: ::windows::core::IInspectable_Vtbl, | |
201 | pub ErrorText: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT, | |
202 | } | |
203 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
204 | #[repr(transparent)] | |
205 | pub struct Enterprise(::windows::core::IUnknown); | |
206 | impl Enterprise { | |
207 | pub fn Id(&self) -> ::windows::core::Result<::windows::core::GUID> { | |
208 | let this = self; | |
209 | unsafe { | |
210 | let mut result__ = ::windows::core::zeroed::<::windows::core::GUID>(); | |
211 | (::windows::core::Interface::vtable(this).Id)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
212 | } | |
213 | } | |
214 | pub fn Name(&self) -> ::windows::core::Result<::windows::core::HSTRING> { | |
215 | let this = self; | |
216 | unsafe { | |
217 | let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); | |
218 | (::windows::core::Interface::vtable(this).Name)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
219 | } | |
220 | } | |
221 | pub fn WorkplaceId(&self) -> ::windows::core::Result<i32> { | |
222 | let this = self; | |
223 | unsafe { | |
224 | let mut result__ = ::windows::core::zeroed::<i32>(); | |
225 | (::windows::core::Interface::vtable(this).WorkplaceId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
226 | } | |
227 | } | |
228 | #[doc = "*Required features: `\"Foundation\"`*"] | |
229 | #[cfg(feature = "Foundation")] | |
230 | pub fn EnrollmentValidFrom(&self) -> ::windows::core::Result<super::super::super::Foundation::DateTime> { | |
231 | let this = self; | |
232 | unsafe { | |
233 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::DateTime>(); | |
234 | (::windows::core::Interface::vtable(this).EnrollmentValidFrom)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
235 | } | |
236 | } | |
237 | #[doc = "*Required features: `\"Foundation\"`*"] | |
238 | #[cfg(feature = "Foundation")] | |
239 | pub fn EnrollmentValidTo(&self) -> ::windows::core::Result<super::super::super::Foundation::DateTime> { | |
240 | let this = self; | |
241 | unsafe { | |
242 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::DateTime>(); | |
243 | (::windows::core::Interface::vtable(this).EnrollmentValidTo)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
244 | } | |
245 | } | |
246 | pub fn Status(&self) -> ::windows::core::Result<EnterpriseStatus> { | |
247 | let this = self; | |
248 | unsafe { | |
249 | let mut result__ = ::windows::core::zeroed::<EnterpriseStatus>(); | |
250 | (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
251 | } | |
252 | } | |
253 | } | |
254 | impl ::core::cmp::PartialEq for Enterprise { | |
255 | fn eq(&self, other: &Self) -> bool { | |
256 | self.0 == other.0 | |
257 | } | |
258 | } | |
259 | impl ::core::cmp::Eq for Enterprise {} | |
260 | impl ::core::fmt::Debug for Enterprise { | |
261 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
262 | f.debug_tuple("Enterprise").field(&self.0).finish() | |
263 | } | |
264 | } | |
265 | impl ::windows::core::RuntimeType for Enterprise { | |
266 | const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Phone.Management.Deployment.Enterprise;{96592f8d-856c-4426-a947-b06307718078})"); | |
267 | } | |
268 | impl ::core::clone::Clone for Enterprise { | |
269 | fn clone(&self) -> Self { | |
270 | Self(self.0.clone()) | |
271 | } | |
272 | } | |
273 | unsafe impl ::windows::core::Interface for Enterprise { | |
274 | type Vtable = IEnterprise_Vtbl; | |
275 | } | |
276 | unsafe impl ::windows::core::ComInterface for Enterprise { | |
277 | const IID: ::windows::core::GUID = <IEnterprise as ::windows::core::ComInterface>::IID; | |
278 | } | |
279 | impl ::windows::core::RuntimeName for Enterprise { | |
280 | const NAME: &'static str = "Windows.Phone.Management.Deployment.Enterprise"; | |
281 | } | |
282 | ::windows::imp::interface_hierarchy!(Enterprise, ::windows::core::IUnknown, ::windows::core::IInspectable); | |
283 | unsafe impl ::core::marker::Send for Enterprise {} | |
284 | unsafe impl ::core::marker::Sync for Enterprise {} | |
285 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
286 | pub struct EnterpriseEnrollmentManager; | |
287 | impl EnterpriseEnrollmentManager { | |
288 | #[doc = "*Required features: `\"Foundation_Collections\"`*"] | |
289 | #[cfg(feature = "Foundation_Collections")] | |
290 | pub fn EnrolledEnterprises() -> ::windows::core::Result<super::super::super::Foundation::Collections::IVectorView<Enterprise>> { | |
291 | Self::IEnterpriseEnrollmentManager(|this| unsafe { | |
292 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVectorView<Enterprise>>(); | |
293 | (::windows::core::Interface::vtable(this).EnrolledEnterprises)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
294 | }) | |
295 | } | |
296 | pub fn CurrentEnterprise() -> ::windows::core::Result<Enterprise> { | |
297 | Self::IEnterpriseEnrollmentManager(|this| unsafe { | |
298 | let mut result__ = ::windows::core::zeroed::<Enterprise>(); | |
299 | (::windows::core::Interface::vtable(this).CurrentEnterprise)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
300 | }) | |
301 | } | |
302 | #[doc = "*Required features: `\"Foundation\"`*"] | |
303 | #[cfg(feature = "Foundation")] | |
304 | pub fn ValidateEnterprisesAsync() -> ::windows::core::Result<super::super::super::Foundation::IAsyncAction> { | |
305 | Self::IEnterpriseEnrollmentManager(|this| unsafe { | |
306 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncAction>(); | |
307 | (::windows::core::Interface::vtable(this).ValidateEnterprisesAsync)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
308 | }) | |
309 | } | |
310 | #[doc = "*Required features: `\"Foundation\"`*"] | |
311 | #[cfg(feature = "Foundation")] | |
312 | pub fn RequestEnrollmentAsync(enrollmenttoken: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperation<EnterpriseEnrollmentResult>> { | |
313 | Self::IEnterpriseEnrollmentManager(|this| unsafe { | |
314 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperation<EnterpriseEnrollmentResult>>(); | |
315 | (::windows::core::Interface::vtable(this).RequestEnrollmentAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(enrollmenttoken), &mut result__).from_abi(result__) | |
316 | }) | |
317 | } | |
318 | #[doc = "*Required features: `\"Foundation\"`*"] | |
319 | #[cfg(feature = "Foundation")] | |
320 | pub fn RequestUnenrollmentAsync(enterprise: &Enterprise) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperation<bool>> { | |
321 | Self::IEnterpriseEnrollmentManager(|this| unsafe { | |
322 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperation<bool>>(); | |
323 | (::windows::core::Interface::vtable(this).RequestUnenrollmentAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(enterprise), &mut result__).from_abi(result__) | |
324 | }) | |
325 | } | |
326 | #[doc(hidden)] | |
327 | pub fn IEnterpriseEnrollmentManager<R, F: FnOnce(&IEnterpriseEnrollmentManager) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { | |
328 | static SHARED: ::windows::imp::FactoryCache<EnterpriseEnrollmentManager, IEnterpriseEnrollmentManager> = ::windows::imp::FactoryCache::new(); | |
329 | SHARED.call(callback) | |
330 | } | |
331 | } | |
332 | impl ::windows::core::RuntimeName for EnterpriseEnrollmentManager { | |
333 | const NAME: &'static str = "Windows.Phone.Management.Deployment.EnterpriseEnrollmentManager"; | |
334 | } | |
335 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
336 | #[repr(transparent)] | |
337 | pub struct EnterpriseEnrollmentResult(::windows::core::IUnknown); | |
338 | impl EnterpriseEnrollmentResult { | |
339 | pub fn EnrolledEnterprise(&self) -> ::windows::core::Result<Enterprise> { | |
340 | let this = self; | |
341 | unsafe { | |
342 | let mut result__ = ::windows::core::zeroed::<Enterprise>(); | |
343 | (::windows::core::Interface::vtable(this).EnrolledEnterprise)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
344 | } | |
345 | } | |
346 | pub fn Status(&self) -> ::windows::core::Result<EnterpriseEnrollmentStatus> { | |
347 | let this = self; | |
348 | unsafe { | |
349 | let mut result__ = ::windows::core::zeroed::<EnterpriseEnrollmentStatus>(); | |
350 | (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
351 | } | |
352 | } | |
353 | } | |
354 | impl ::core::cmp::PartialEq for EnterpriseEnrollmentResult { | |
355 | fn eq(&self, other: &Self) -> bool { | |
356 | self.0 == other.0 | |
357 | } | |
358 | } | |
359 | impl ::core::cmp::Eq for EnterpriseEnrollmentResult {} | |
360 | impl ::core::fmt::Debug for EnterpriseEnrollmentResult { | |
361 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
362 | f.debug_tuple("EnterpriseEnrollmentResult").field(&self.0).finish() | |
363 | } | |
364 | } | |
365 | impl ::windows::core::RuntimeType for EnterpriseEnrollmentResult { | |
366 | const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Phone.Management.Deployment.EnterpriseEnrollmentResult;{9ff71ce6-90db-4342-b326-1729aa91301c})"); | |
367 | } | |
368 | impl ::core::clone::Clone for EnterpriseEnrollmentResult { | |
369 | fn clone(&self) -> Self { | |
370 | Self(self.0.clone()) | |
371 | } | |
372 | } | |
373 | unsafe impl ::windows::core::Interface for EnterpriseEnrollmentResult { | |
374 | type Vtable = IEnterpriseEnrollmentResult_Vtbl; | |
375 | } | |
376 | unsafe impl ::windows::core::ComInterface for EnterpriseEnrollmentResult { | |
377 | const IID: ::windows::core::GUID = <IEnterpriseEnrollmentResult as ::windows::core::ComInterface>::IID; | |
378 | } | |
379 | impl ::windows::core::RuntimeName for EnterpriseEnrollmentResult { | |
380 | const NAME: &'static str = "Windows.Phone.Management.Deployment.EnterpriseEnrollmentResult"; | |
381 | } | |
382 | ::windows::imp::interface_hierarchy!(EnterpriseEnrollmentResult, ::windows::core::IUnknown, ::windows::core::IInspectable); | |
383 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
384 | pub struct InstallationManager; | |
385 | impl InstallationManager { | |
386 | #[doc = "*Required features: `\"Foundation\"`*"] | |
387 | #[cfg(feature = "Foundation")] | |
388 | pub fn AddPackageAsync(title: &::windows::core::HSTRING, sourcelocation: &super::super::super::Foundation::Uri) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>> { | |
389 | Self::IInstallationManagerStatics(|this| unsafe { | |
390 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>(); | |
391 | (::windows::core::Interface::vtable(this).AddPackageAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(sourcelocation), &mut result__).from_abi(result__) | |
392 | }) | |
393 | } | |
394 | #[doc = "*Required features: `\"Foundation\"`*"] | |
395 | #[cfg(feature = "Foundation")] | |
396 | pub fn AddPackagePreloadedAsync(title: &::windows::core::HSTRING, sourcelocation: &super::super::super::Foundation::Uri, instanceid: &::windows::core::HSTRING, offerid: &::windows::core::HSTRING, license: &super::super::super::Foundation::Uri) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>> { | |
397 | Self::IInstallationManagerStatics(|this| unsafe { | |
398 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>(); | |
399 | (::windows::core::Interface::vtable(this).AddPackagePreloadedAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(title), ::core::mem::transmute_copy(sourcelocation), ::core::mem::transmute_copy(instanceid), ::core::mem::transmute_copy(offerid), ::core::mem::transmute_copy(license), &mut result__).from_abi(result__) | |
400 | }) | |
401 | } | |
402 | #[doc = "*Required features: `\"Foundation_Collections\"`*"] | |
403 | #[cfg(feature = "Foundation_Collections")] | |
404 | pub fn GetPendingPackageInstalls() -> ::windows::core::Result<super::super::super::Foundation::Collections::IIterable<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>> { | |
405 | Self::IInstallationManagerStatics(|this| unsafe { | |
406 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IIterable<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>>(); | |
407 | (::windows::core::Interface::vtable(this).GetPendingPackageInstalls)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
408 | }) | |
409 | } | |
410 | #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] | |
411 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
412 | pub fn FindPackagesForCurrentPublisher() -> ::windows::core::Result<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>> { | |
413 | Self::IInstallationManagerStatics(|this| unsafe { | |
414 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>>(); | |
415 | (::windows::core::Interface::vtable(this).FindPackagesForCurrentPublisher)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
416 | }) | |
417 | } | |
418 | #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] | |
419 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
420 | pub fn FindPackages() -> ::windows::core::Result<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>> { | |
421 | Self::IInstallationManagerStatics(|this| unsafe { | |
422 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>>(); | |
423 | (::windows::core::Interface::vtable(this).FindPackages)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
424 | }) | |
425 | } | |
426 | #[doc = "*Required features: `\"Foundation\"`, `\"Management_Deployment\"`*"] | |
427 | #[cfg(all(feature = "Foundation", feature = "Management_Deployment"))] | |
428 | pub fn RemovePackageAsync(packagefullname: &::windows::core::HSTRING, removaloptions: super::super::super::Management::Deployment::RemovalOptions) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>> { | |
429 | Self::IInstallationManagerStatics2(|this| unsafe { | |
430 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>(); | |
431 | (::windows::core::Interface::vtable(this).RemovePackageAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(packagefullname), removaloptions, &mut result__).from_abi(result__) | |
432 | }) | |
433 | } | |
434 | #[doc = "*Required features: `\"Foundation_Collections\"`, `\"Management_Deployment\"`*"] | |
435 | #[cfg(all(feature = "Foundation_Collections", feature = "Management_Deployment"))] | |
436 | pub fn RegisterPackageAsync<P0>(manifesturi: &super::super::super::Foundation::Uri, dependencypackageuris: P0, deploymentoptions: super::super::super::Management::Deployment::DeploymentOptions) -> ::windows::core::Result<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>> | |
437 | where | |
438 | P0: ::windows::core::TryIntoParam<super::super::super::Foundation::Collections::IIterable<super::super::super::Foundation::Uri>>, | |
439 | { | |
440 | Self::IInstallationManagerStatics2(|this| unsafe { | |
441 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncOperationWithProgress<PackageInstallResult, u32>>(); | |
442 | (::windows::core::Interface::vtable(this).RegisterPackageAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(manifesturi), dependencypackageuris.try_into_param()?.abi(), deploymentoptions, &mut result__).from_abi(result__) | |
443 | }) | |
444 | } | |
445 | #[doc = "*Required features: `\"ApplicationModel\"`, `\"Foundation_Collections\"`*"] | |
446 | #[cfg(all(feature = "ApplicationModel", feature = "Foundation_Collections"))] | |
447 | pub fn FindPackagesByNamePublisher(packagename: &::windows::core::HSTRING, packagepublisher: &::windows::core::HSTRING) -> ::windows::core::Result<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>> { | |
448 | Self::IInstallationManagerStatics2(|this| unsafe { | |
449 | let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IIterable<super::super::super::ApplicationModel::Package>>(); | |
450 | (::windows::core::Interface::vtable(this).FindPackagesByNamePublisher)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(packagename), ::core::mem::transmute_copy(packagepublisher), &mut result__).from_abi(result__) | |
451 | }) | |
452 | } | |
453 | #[doc(hidden)] | |
454 | pub fn IInstallationManagerStatics<R, F: FnOnce(&IInstallationManagerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { | |
455 | static SHARED: ::windows::imp::FactoryCache<InstallationManager, IInstallationManagerStatics> = ::windows::imp::FactoryCache::new(); | |
456 | SHARED.call(callback) | |
457 | } | |
458 | #[doc(hidden)] | |
459 | pub fn IInstallationManagerStatics2<R, F: FnOnce(&IInstallationManagerStatics2) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { | |
460 | static SHARED: ::windows::imp::FactoryCache<InstallationManager, IInstallationManagerStatics2> = ::windows::imp::FactoryCache::new(); | |
461 | SHARED.call(callback) | |
462 | } | |
463 | } | |
464 | impl ::windows::core::RuntimeName for InstallationManager { | |
465 | const NAME: &'static str = "Windows.Phone.Management.Deployment.InstallationManager"; | |
466 | } | |
467 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
468 | #[repr(transparent)] | |
469 | pub struct PackageInstallResult(::windows::core::IUnknown); | |
470 | impl PackageInstallResult { | |
471 | pub fn ProductId(&self) -> ::windows::core::Result<::windows::core::HSTRING> { | |
472 | let this = self; | |
473 | unsafe { | |
474 | let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); | |
475 | (::windows::core::Interface::vtable(this).ProductId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
476 | } | |
477 | } | |
478 | #[doc = "*Required features: `\"Management_Deployment\"`*"] | |
479 | #[cfg(feature = "Management_Deployment")] | |
480 | pub fn InstallState(&self) -> ::windows::core::Result<super::super::super::Management::Deployment::PackageInstallState> { | |
481 | let this = self; | |
482 | unsafe { | |
483 | let mut result__ = ::windows::core::zeroed::<super::super::super::Management::Deployment::PackageInstallState>(); | |
484 | (::windows::core::Interface::vtable(this).InstallState)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
485 | } | |
486 | } | |
487 | pub fn ErrorText(&self) -> ::windows::core::Result<::windows::core::HSTRING> { | |
488 | let this = &::windows::core::ComInterface::cast::<IPackageInstallResult2>(self)?; | |
489 | unsafe { | |
490 | let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>(); | |
491 | (::windows::core::Interface::vtable(this).ErrorText)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__) | |
492 | } | |
493 | } | |
494 | } | |
495 | impl ::core::cmp::PartialEq for PackageInstallResult { | |
496 | fn eq(&self, other: &Self) -> bool { | |
497 | self.0 == other.0 | |
498 | } | |
499 | } | |
500 | impl ::core::cmp::Eq for PackageInstallResult {} | |
501 | impl ::core::fmt::Debug for PackageInstallResult { | |
502 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
503 | f.debug_tuple("PackageInstallResult").field(&self.0).finish() | |
504 | } | |
505 | } | |
506 | impl ::windows::core::RuntimeType for PackageInstallResult { | |
507 | const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Phone.Management.Deployment.PackageInstallResult;{33e8eed5-0f7e-4473-967c-7d6e1c0e7de1})"); | |
508 | } | |
509 | impl ::core::clone::Clone for PackageInstallResult { | |
510 | fn clone(&self) -> Self { | |
511 | Self(self.0.clone()) | |
512 | } | |
513 | } | |
514 | unsafe impl ::windows::core::Interface for PackageInstallResult { | |
515 | type Vtable = IPackageInstallResult_Vtbl; | |
516 | } | |
517 | unsafe impl ::windows::core::ComInterface for PackageInstallResult { | |
518 | const IID: ::windows::core::GUID = <IPackageInstallResult as ::windows::core::ComInterface>::IID; | |
519 | } | |
520 | impl ::windows::core::RuntimeName for PackageInstallResult { | |
521 | const NAME: &'static str = "Windows.Phone.Management.Deployment.PackageInstallResult"; | |
522 | } | |
523 | ::windows::imp::interface_hierarchy!(PackageInstallResult, ::windows::core::IUnknown, ::windows::core::IInspectable); | |
524 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
525 | #[repr(transparent)] | |
526 | #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] | |
527 | pub struct EnterpriseEnrollmentStatus(pub i32); | |
528 | impl EnterpriseEnrollmentStatus { | |
529 | pub const Success: Self = Self(0i32); | |
530 | pub const CancelledByUser: Self = Self(1i32); | |
531 | pub const UnknownFailure: Self = Self(2i32); | |
532 | } | |
533 | impl ::core::marker::Copy for EnterpriseEnrollmentStatus {} | |
534 | impl ::core::clone::Clone for EnterpriseEnrollmentStatus { | |
535 | fn clone(&self) -> Self { | |
536 | *self | |
537 | } | |
538 | } | |
539 | impl ::core::default::Default for EnterpriseEnrollmentStatus { | |
540 | fn default() -> Self { | |
541 | Self(0) | |
542 | } | |
543 | } | |
544 | impl ::windows::core::TypeKind for EnterpriseEnrollmentStatus { | |
545 | type TypeKind = ::windows::core::CopyType; | |
546 | } | |
547 | impl ::core::fmt::Debug for EnterpriseEnrollmentStatus { | |
548 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
549 | f.debug_tuple("EnterpriseEnrollmentStatus").field(&self.0).finish() | |
550 | } | |
551 | } | |
552 | impl ::windows::core::RuntimeType for EnterpriseEnrollmentStatus { | |
553 | const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Phone.Management.Deployment.EnterpriseEnrollmentStatus;i4)"); | |
554 | } | |
555 | #[doc = "*Required features: `\"Phone_Management_Deployment\"`*"] | |
556 | #[repr(transparent)] | |
557 | #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] | |
558 | pub struct EnterpriseStatus(pub i32); | |
559 | impl EnterpriseStatus { | |
560 | pub const Enrolled: Self = Self(0i32); | |
561 | pub const Disabled: Self = Self(1i32); | |
562 | pub const Revoked: Self = Self(2i32); | |
563 | pub const Expired: Self = Self(3i32); | |
564 | } | |
565 | impl ::core::marker::Copy for EnterpriseStatus {} | |
566 | impl ::core::clone::Clone for EnterpriseStatus { | |
567 | fn clone(&self) -> Self { | |
568 | *self | |
569 | } | |
570 | } | |
571 | impl ::core::default::Default for EnterpriseStatus { | |
572 | fn default() -> Self { | |
573 | Self(0) | |
574 | } | |
575 | } | |
576 | impl ::windows::core::TypeKind for EnterpriseStatus { | |
577 | type TypeKind = ::windows::core::CopyType; | |
578 | } | |
579 | impl ::core::fmt::Debug for EnterpriseStatus { | |
580 | fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { | |
581 | f.debug_tuple("EnterpriseStatus").field(&self.0).finish() | |
582 | } | |
583 | } | |
584 | impl ::windows::core::RuntimeType for EnterpriseStatus { | |
585 | const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Phone.Management.Deployment.EnterpriseStatus;i4)"); | |
586 | } | |
587 | #[cfg(feature = "implement")] | |
588 | ::core::include!("impl.rs"); |